diff --git a/e2e/rbd.go b/e2e/rbd.go index d0cf74f9bba4..a547b3956edf 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -707,43 +707,6 @@ var _ = Describe("RBD", func() { } }) - By("create a PVC and bind it to an app using rbd-nbd mounter with encryption", func() { - err := deleteResource(rbdExamplePath + "storageclass.yaml") - if err != nil { - e2elog.Failf("failed to delete storageclass with error %v", err) - } - // Storage class with rbd-nbd mounter - err = createRBDStorageClass( - f.ClientSet, - f, - defaultSCName, - nil, - map[string]string{ - "mounter": "rbd-nbd", - "mapOptions": nbdMapOptions, - "cephLogStrategy": e2eDefaultCephLogStrategy, - "encrypted": "true", - }, - deletePolicy) - if err != nil { - e2elog.Failf("failed to create storageclass with error %v", err) - } - err = validateEncryptedPVCAndAppBinding(pvcPath, appPath, noKMS, f) - if err != nil { - e2elog.Failf("failed to validate encrypted pvc with error %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 encrypted RBD volume", func() { err := deleteResource(rbdExamplePath + "storageclass.yaml") if err != nil { @@ -1101,6 +1064,43 @@ var _ = Describe("RBD", func() { }, ) + By("create a PVC and bind it to an app using rbd-nbd mounter with encryption", func() { + err := deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + // Storage class with rbd-nbd mounter + err = createRBDStorageClass( + f.ClientSet, + f, + defaultSCName, + nil, + map[string]string{ + "mounter": "rbd-nbd", + "mapOptions": nbdMapOptions, + "cephLogStrategy": e2eDefaultCephLogStrategy, + "encrypted": "true", + }, + deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + err = validateEncryptedPVCAndAppBinding(pvcPath, appPath, noKMS, f) + if err != nil { + e2elog.Failf("failed to validate encrypted pvc with error %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 clone and bind it to an app", func() { // snapshot beta is only supported from v1.17+ if k8sVersionGreaterEquals(f.ClientSet, 1, 17) {