]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/08-hosts.e2e-spec.ts
buildsys: change download over to reef release
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / workflow / 08-hosts.e2e-spec.ts
CommitLineData
2a845540
TL
1/* tslint:disable*/
2import { HostsPageHelper } from '../../cluster/hosts.po';
3import { ServicesPageHelper } from '../../cluster/services.po';
4/* tslint:enable*/
20effc67
TL
5
6describe('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');
39ae355f 21 services.addService('rgw', false, 4);
20effc67
TL
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
2a845540
TL
34 it('should force maintenance and exit', () => {
35 hosts.maintenance(hostnames[3], true, true);
20effc67
TL
36 });
37
38 it('should drain, remove and add the host back', () => {
2a845540
TL
39 hosts.drain(hostnames[3]);
40 hosts.remove(hostnames[3]);
20effc67 41 hosts.navigateTo('add');
2a845540
TL
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']);
20effc67
TL
48 });
49});