]> git.proxmox.com Git - ceph.git/blame - ceph/src/pybind/mgr/dashboard/frontend/cypress/integration/orchestrator/workflow/06-cluster-check.e2e-spec.ts
import ceph 16.2.7
[ceph.git] / ceph / src / pybind / mgr / dashboard / frontend / cypress / integration / orchestrator / workflow / 06-cluster-check.e2e-spec.ts
CommitLineData
a4b75251
TL
1import { CreateClusterWizardHelper } from 'cypress/integration/cluster/create-cluster.po';
2import { HostsPageHelper } from 'cypress/integration/cluster/hosts.po';
3import { OSDsPageHelper } from 'cypress/integration/cluster/osds.po';
4import { ServicesPageHelper } from 'cypress/integration/cluster/services.po';
5
6describe('when cluster creation is completed', () => {
7 const createCluster = new CreateClusterWizardHelper();
8 const services = new ServicesPageHelper();
9 const serviceName = 'rgw.foo';
10
11 beforeEach(() => {
12 cy.login();
13 Cypress.Cookies.preserveOnce('token');
14 });
15
16 it('should redirect to dashboard landing page after cluster creation', () => {
17 createCluster.navigateTo();
18 createCluster.createCluster();
19
20 cy.get('.nav-link').contains('Review').click();
21 cy.get('button[aria-label="Next"]').click();
22 cy.get('cd-dashboard').should('exist');
23 });
24
25 describe('Hosts page', () => {
26 const hosts = new HostsPageHelper();
27 const hostnames = [
28 'ceph-node-00.cephlab.com',
29 'ceph-node-01.cephlab.com',
30 'ceph-node-02.cephlab.com'
31 ];
32
33 beforeEach(() => {
34 hosts.navigateTo();
35 });
36
37 it('should have removed "_no_schedule" label', () => {
38 for (const hostname of hostnames) {
39 hosts.checkLabelExists(hostname, ['_no_schedule'], false);
40 }
41 });
42
43 it('should display inventory', () => {
44 hosts.clickTab('cd-host-details', hostnames[1], 'Physical Disks');
45 cy.get('cd-host-details').within(() => {
46 hosts.getTableCount('total').should('be.gte', 0);
47 });
48 });
49
50 it('should display daemons', () => {
51 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
52 cy.get('cd-host-details').within(() => {
53 hosts.getTableCount('total').should('be.gte', 0);
54 });
55 });
56
57 it('should check if rgw service is running', () => {
58 hosts.clickTab('cd-host-details', hostnames[1], 'Daemons');
59 cy.get('cd-host-details').within(() => {
60 services.checkServiceStatus('rgw');
61 });
62 });
63
64 it('should force maintenance and exit', { retries: 1 }, () => {
65 hosts.maintenance(hostnames[1], true, true);
66 });
67 });
68
69 describe('OSDs page', () => {
70 const osds = new OSDsPageHelper();
71
72 beforeEach(() => {
73 osds.navigateTo();
74 });
75
76 it('should check if osds are created', { retries: 1 }, () => {
77 osds.getTableCount('total').should('be.gte', 1);
78 });
79 });
80
81 describe('Services page', () => {
82 beforeEach(() => {
83 services.navigateTo();
84 });
85
86 it('should check if services are created', () => {
87 services.checkExist(serviceName, true);
88 });
89 });
90});