]> git.proxmox.com Git - ceph.git/blobdiff - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts-force-maintenance.e2e-spec.ts
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / 01-hosts-force-maintenance.e2e-spec.ts
diff --git a/ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts-force-maintenance.e2e-spec.ts b/ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/01-hosts-force-maintenance.e2e-spec.ts
deleted file mode 100644 (file)
index 9a176e6..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-import { HostsPageHelper } from '../cluster/hosts.po';
-
-describe('Hosts page', () => {
-  const hosts = new HostsPageHelper();
-
-  beforeEach(() => {
-    cy.login();
-    Cypress.Cookies.preserveOnce('token');
-    hosts.navigateTo();
-  });
-
-  describe('when Orchestrator is available', () => {
-    beforeEach(function () {
-      cy.fixture('orchestrator/inventory.json').as('hosts');
-      cy.fixture('orchestrator/services.json').as('services');
-    });
-
-    it('should force enter host into maintenance', function () {
-      const hostname = Cypress._.sample(this.hosts).name;
-      const hostnameList = new Array();
-      this.hosts.array.forEach((host: any) => {
-        hostnameList.push(host.hostname);
-      });
-      const serviceList = new Array();
-      this.services.forEach((service: any) => {
-        if (hostname === service.hostname) {
-          serviceList.push(service.daemon_type);
-        }
-      });
-
-      let enterMaintenance = true;
-
-      // Force maintenance might throw out error if host are less than 3.
-      if (hostnameList.length < 3) {
-        enterMaintenance = false;
-      }
-
-      serviceList.forEach((service: string) => {
-        if (service !== 'rgw' && (service === 'mgr' || service === 'alertmanager')) {
-          enterMaintenance = false;
-        }
-      });
-
-      if (enterMaintenance) {
-        hosts.maintenance(hostname, true, true);
-      }
-    });
-  });
-});