-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1436 from alfonsomthd/cephfs-new-pool
Create StorageClass: allow creation of CephFS new pool
- Loading branch information
Showing
40 changed files
with
2,367 additions
and
1,133 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
}); | ||
}); |
Oops, something went wrong.