diff --git a/e2e/cephfs.go b/e2e/cephfs.go index f717e0e69..602573ad4 100644 --- a/e2e/cephfs.go +++ b/e2e/cephfs.go @@ -71,7 +71,9 @@ var _ = Describe("cephfs", func() { BeforeEach(func() { c = f.ClientSet createConfigMap(cephfsDirPath, f.ClientSet, f) - deployCephfsPlugin() + if deployCephFS { + deployCephfsPlugin() + } createCephfsSecret(f.ClientSet, f) }) @@ -82,7 +84,9 @@ var _ = Describe("cephfs", func() { // log node plugin logsCSIPods("app=csi-cephfsplugin", c) } - deleteCephfsPlugin() + if deployCephFS { + deleteCephfsPlugin() + } deleteConfigMap(cephfsDirPath) deleteResource(cephfsExamplePath + "secret.yaml") deleteResource(cephfsExamplePath + "storageclass.yaml") diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 9b319046c..859e3f7cf 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -16,12 +16,16 @@ import ( var ( deployTimeout int + deployCephFS bool + deployRBD bool ) func init() { log.SetOutput(GinkgoWriter) flag.IntVar(&deployTimeout, "deploy-timeout", 10, "timeout to wait for created kubernetes resources") + flag.BoolVar(&deployCephFS, "deploy-cephfs", true, "deploy cephfs csi driver") + flag.BoolVar(&deployRBD, "deploy-rbd", true, "deploy rbd csi driver") setDefaultKubeconfig() diff --git a/e2e/rbd.go b/e2e/rbd.go index 576e4fb2c..2e70799bd 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -74,7 +74,9 @@ var _ = Describe("RBD", func() { BeforeEach(func() { c = f.ClientSet createConfigMap(rbdDirPath, f.ClientSet, f) - deployRBDPlugin() + if deployRBD { + deployRBDPlugin() + } createRBDStorageClass(f.ClientSet, f, make(map[string]string)) createRBDSecret(f.ClientSet, f) deployVault(f.ClientSet, deployTimeout) @@ -87,7 +89,9 @@ var _ = Describe("RBD", func() { // log node plugin logsCSIPods("app=csi-rbdplugin", c) } - deleteRBDPlugin() + if deployRBD { + deleteRBDPlugin() + } deleteConfigMap(rbdDirPath) deleteResource(rbdExamplePath + "secret.yaml") deleteResource(rbdExamplePath + "storageclass.yaml")