mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-17 20:00:23 +00:00
e2e: Verify if app can mount ec pvc
Verify if an application is able to mount a pvc created via an erasure coded pool. Signed-off-by: Yug Gupta <yuggupta27@gmail.com>
This commit is contained in:
parent
8081ac8251
commit
34c37663c2
43
e2e/rbd.go
43
e2e/rbd.go
@ -37,6 +37,7 @@ var (
|
||||
rbdDeploymentName = "csi-rbdplugin-provisioner"
|
||||
rbdDaemonsetName = "csi-rbdplugin"
|
||||
defaultRBDPool = "replicapool"
|
||||
erasureCodedPool = "ec-pool"
|
||||
// Topology related variables.
|
||||
nodeRegionLabel = "test.failure-domain/region"
|
||||
regionValue = "testregion"
|
||||
@ -465,6 +466,48 @@ var _ = Describe("RBD", func() {
|
||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||
})
|
||||
|
||||
By("create an erasure coded PVC and bind it to an app", func() {
|
||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete storageclass: %v", err)
|
||||
}
|
||||
err = createRBDStorageClass(
|
||||
f.ClientSet,
|
||||
f,
|
||||
defaultSCName,
|
||||
nil,
|
||||
map[string]string{
|
||||
"dataPool": erasureCodedPool,
|
||||
"pool": defaultRBDPool,
|
||||
},
|
||||
deletePolicy)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create storageclass: %v", err)
|
||||
}
|
||||
pvc, app, err := createPVCAndAppBinding(pvcPath, appPath, f, deployTimeout)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create pvc and application binding: %v", err)
|
||||
}
|
||||
err = checkPVCDataPoolForImageInPool(f, pvc, defaultRBDPool, "ec-pool")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to check data pool for image: %v", err)
|
||||
}
|
||||
err = deletePVCAndApp("", f, pvc, app)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete pvc and application : %v", err)
|
||||
}
|
||||
// validate created backend rbd images
|
||||
validateRBDImageCount(f, 0, defaultRBDPool)
|
||||
err = deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to delete storageclass with error %v", err)
|
||||
}
|
||||
err = createRBDStorageClass(f.ClientSet, f, defaultSCName, nil, nil, deletePolicy)
|
||||
if err != nil {
|
||||
e2elog.Failf("failed to create storageclass with error %v", err)
|
||||
}
|
||||
})
|
||||
|
||||
By("create a PVC and bind it to an app with ext4 as the FS ", func() {
|
||||
err := deleteResource(rbdExamplePath + "storageclass.yaml")
|
||||
if err != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user