]> git.proxmox.com Git - ceph.git/blob - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/08-hosts.e2e-spec.ts
374ecdb0cb6ee8d827d92ff037098cbdcef383cd
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / workflow / 08-hosts.e2e-spec.ts
1 /* tslint:disable*/
2 import { HostsPageHelper } from '../../cluster/hosts.po';
3 import { ServicesPageHelper } from '../../cluster/services.po';
4 /* tslint:enable*/
5
6 describe('Host Page', () => {
7 const hosts = new HostsPageHelper();
8 const services = new ServicesPageHelper();
9
10 const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
11
12 beforeEach(() => {
13 cy.login();
14 Cypress.Cookies.preserveOnce('token');
15 hosts.navigateTo();
16 });
17
18 // rgw is needed for testing the force maintenance
19 it('should create rgw services', () => {
20 services.navigateTo('create');
21 services.addService('rgw', false, '4');
22 services.checkExist('rgw.foo', true);
23 });
24
25 it('should check if rgw daemon is running on all hosts', () => {
26 for (const hostname of hostnames) {
27 hosts.clickTab('cd-host-details', hostname, 'Daemons');
28 cy.get('cd-host-details').within(() => {
29 services.checkServiceStatus('rgw');
30 });
31 }
32 });
33
34 it('should force maintenance and exit', () => {
35 hosts.maintenance(hostnames[3], true, true);
36 });
37
38 it('should drain, remove and add the host back', () => {
39 hosts.drain(hostnames[3]);
40 hosts.remove(hostnames[3]);
41 hosts.navigateTo('add');
42 hosts.add(hostnames[3]);
43 hosts.checkExist(hostnames[3], true);
44 });
45
46 it('should show the exact count of daemons', () => {
47 hosts.checkServiceInstancesExist(hostnames[0], ['mgr: 1', 'prometheus: 1']);
48 });
49 });