2 import { HostsPageHelper } from '../../cluster/hosts.po';
3 import { ServicesPageHelper } from '../../cluster/services.po';
6 describe('Host Page', () => {
7 const hosts = new HostsPageHelper();
8 const services = new ServicesPageHelper();
10 const hostnames = ['ceph-node-00', 'ceph-node-01', 'ceph-node-02', 'ceph-node-03'];
14 Cypress.Cookies.preserveOnce('token');
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);
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');
34 it('should force maintenance and exit', () => {
35 hosts.maintenance(hostnames[3], true, true);
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);
46 it('should show the exact count of daemons', () => {
47 hosts.checkServiceInstancesExist(hostnames[0], ['mgr: 1', 'prometheus: 1']);