Skip to content

Commit

Permalink
Merge pull request #1436 from alfonsomthd/cephfs-new-pool
Browse files Browse the repository at this point in the history
Create StorageClass: allow creation of CephFS new pool
  • Loading branch information
openshift-merge-bot[bot] authored Jun 19, 2024
2 parents f2759d8 + 83ee2b0 commit 0d0f86a
Show file tree
Hide file tree
Showing 40 changed files with 2,367 additions and 1,133 deletions.
7 changes: 7 additions & 0 deletions cypress/constants/storage-pool-const.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ export enum POOL_PROGRESS {
BOUNDED = 'bounded',
}

export enum POOL_TYPE {
BLOCK = 'Block',
FILESYSTEM = 'Filesystem',
}

export const COMPRESSION_ON = 'aggressive';
export const ROOK_MODEL = 'cephblockpools.ceph.rook.io';
export const CEPH_DEFAULT_BLOCK_POOL_NAME = 'ocs-storagecluster-cephblockpool';
export const CEPH_DEFAULT_FS_POOL_PREFIX = 'ocs-storagecluster-cephfilesystem';
export const CEPH_DEFAULT_FS_POOL_NAME = `${CEPH_DEFAULT_FS_POOL_PREFIX}-data0`;
118 changes: 0 additions & 118 deletions cypress/tests/block-pool.spec.ts

This file was deleted.

67 changes: 0 additions & 67 deletions cypress/tests/multiple-pool.spec.ts

This file was deleted.

66 changes: 66 additions & 0 deletions cypress/tests/storage-pool-in-storageclass-form.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
import {
CEPH_DEFAULT_FS_POOL_PREFIX,
POOL_TYPE,
} from '../constants/storage-pool-const';
import {
deleteBlockPoolFromCLI,
verifyBlockPoolJSON,
deleteStoragePool,
createStoragePoolInSCForm,
fillPoolModalForm,
checkStoragePoolIsSelectableInSCForm,
} from '../views/storage-pool';

describe('Test storage pool creation when creating a new StorageClass', () => {
before(() => {
cy.login();
cy.visit('/');
cy.install();
});

after(() => {
cy.logout();
});

it(`Creates a new ${POOL_TYPE.BLOCK} pool`, () => {
const poolName = 'sc-block-name';

cy.clickNavLink(['Storage', 'StorageClasses']);
cy.byTestID('item-create').click();

cy.log(`Create a new ${POOL_TYPE.BLOCK} pool`);
createStoragePoolInSCForm(POOL_TYPE.BLOCK, poolName);
checkStoragePoolIsSelectableInSCForm(poolName);
verifyBlockPoolJSON(poolName);

cy.log(
`Try to create a new ${POOL_TYPE.BLOCK} pool using an existing name`
);
fillPoolModalForm(POOL_TYPE.BLOCK, poolName);
cy.byLegacyTestID('confirm-action').should('be.disabled');
cy.byLegacyTestID('modal-cancel-action').click();

deleteBlockPoolFromCLI(poolName);
});

it(`Creates a new ${POOL_TYPE.FILESYSTEM} pool`, () => {
const poolName = 'sc-fs-name';
const poolFullName = `${CEPH_DEFAULT_FS_POOL_PREFIX}-${poolName}`;

cy.clickNavLink(['Storage', 'StorageClasses']);
cy.byTestID('item-create').click();

cy.log(`Create a new ${POOL_TYPE.FILESYSTEM} pool`);
createStoragePoolInSCForm(POOL_TYPE.FILESYSTEM, poolName);
checkStoragePoolIsSelectableInSCForm(poolFullName);

cy.log(
`Try to create a new ${POOL_TYPE.FILESYSTEM} pool using an existing name`
);
fillPoolModalForm(POOL_TYPE.FILESYSTEM, poolName);
cy.byLegacyTestID('confirm-action').should('be.disabled');
cy.byLegacyTestID('modal-cancel-action').click();

deleteStoragePool(poolFullName);
});
});
Loading

0 comments on commit 0d0f86a

Please sign in to comment.