From e14d649547db37468cdda163e9e2275d4388927c Mon Sep 17 00:00:00 2001 From: Yug Date: Thu, 22 Apr 2021 12:27:55 +0530 Subject: [PATCH] e2e: add cephfs test for sc, secret via helm add cephfs test for validating storageclass and secret deployment via helm. Signed-off-by: Yug --- e2e/cephfs.go | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/e2e/cephfs.go b/e2e/cephfs.go index 883bb259f..5b1391327 100644 --- a/e2e/cephfs.go +++ b/e2e/cephfs.go @@ -280,6 +280,25 @@ var _ = Describe("cephfs", func() { } }) + // test only if ceph-csi is deployed via helm + if helmTest { + By("verify PVC and app binding on helm installation", func() { + err := validatePVCAndAppBinding(pvcPath, appPath, f) + if err != nil { + e2elog.Failf("failed to validate CephFS pvc and application binding with error %v", err) + } + // Deleting the storageclass and secret created by helm + err = deleteResource(cephfsExamplePath + "storageclass.yaml") + if err != nil { + e2elog.Failf("failed to delete CephFS storageclass with error %v", err) + } + err = deleteResource(cephfsExamplePath + "secret.yaml") + if err != nil { + e2elog.Failf("failed to delete CephFS storageclass with error %v", err) + } + }) + } + By("check static PVC", func() { scPath := cephfsExamplePath + "secret.yaml" err := validateCephFsStaticPV(f, appPath, scPath)