From 532f69458bf9d7d101912ef24e5535b072cb10b6 Mon Sep 17 00:00:00 2001 From: Prasanna Kumar Kalever Date: Mon, 3 May 2021 13:34:46 +0530 Subject: [PATCH] e2e: enable an old testcase as the ndb module is available This testcase tests journaling/exclusive-lock image-features with rbd-nbd mounter Signed-off-by: Prasanna Kumar Kalever --- e2e/rbd.go | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/e2e/rbd.go b/e2e/rbd.go index e27bc38edc59..e912b212c845 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -727,17 +727,28 @@ var _ = Describe("RBD", func() { } }) - // TODO: enable this test when we support rbd-nbd mounter in E2E. - // nbd module should be present on the host machine to run use the - // rbd-nbd mounter. - - // By("create a PVC and Bind it to an app with journaling/exclusive-lock image-features and rbd-nbd mounter", func() { - // deleteResource(rbdExamplePath + "storageclass.yaml") - // createRBDStorageClass(f.ClientSet, f, nil, map[string]string{"imageFeatures": "layering,journaling,exclusive-lock", "mounter": "rbd-nbd"}) - // validatePVCAndAppBinding(pvcPath, appPath, f) - // deleteResource(rbdExamplePath + "storageclass.yaml") - // createRBDStorageClass(f.ClientSet, f, nil, make(map[string]string)) - // }) + By("create a PVC and Bind it to an app with journaling/exclusive-lock image-features and rbd-nbd mounter", func() { + err := deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + err = createRBDStorageClass(f.ClientSet, f, nil, map[string]string{"imageFeatures": "layering,journaling,exclusive-lock", "mounter": "rbd-nbd"}, deletePolicy) + if err != nil { + e2elog.Failf("failed to create storageclass with error %v", err) + } + err = validatePVCAndAppBinding(pvcPath, appPath, f) + if err != nil { + e2elog.Failf("failed to validate pvc and application binding with error %v", err) + } + err = deleteResource(rbdExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete storageclass with error %v", err) + } + err = createRBDStorageClass(f.ClientSet, f, 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+