From 0df5de9d572585469150663c061badf6948fde4b Mon Sep 17 00:00:00 2001 From: Praveen M Date: Wed, 23 Oct 2024 13:40:52 +0530 Subject: [PATCH] e2e: add operatorDeployment flag This commit adds `operatorDeployment` flag, defaults to false. Set this to true for running test on ceph-csi deployment via operator. Signed-off-by: Praveen M --- e2e/e2e_test.go | 1 + e2e/utils.go | 41 +++++++++++++++++++++-------------------- 2 files changed, 22 insertions(+), 20 deletions(-) diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index e4538788a..671029be2 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -52,6 +52,7 @@ func init() { flag.StringVar(&fileSystemName, "filesystem", "myfs", "CephFS filesystem to use") flag.StringVar(&clusterID, "clusterid", "", "Ceph cluster ID to use (defaults to `ceph fsid` detection)") flag.StringVar(&nfsDriverName, "nfs-driver", "nfs.csi.ceph.com", "name of the driver for NFS-volumes") + flag.BoolVar(&operatorDeployment, "operator-deployment", false, "test running on deployment via operator") setDefaultKubeconfig() // Register framework flags, then handle flags diff --git a/e2e/utils.go b/e2e/utils.go index 0e29f53c1..05ad46013 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -80,26 +80,27 @@ const ( var ( // cli flags. - deployTimeout int - deployCephFS bool - deployRBD bool - deployNFS bool - testCephFS bool - testCephFSFscrypt bool - testRBD bool - testRBDFSCrypt bool - testNBD bool - testNFS bool - helmTest bool - upgradeTesting bool - upgradeVersion string - cephCSINamespace string - rookNamespace string - radosNamespace string - poll = 2 * time.Second - isOpenShift bool - clusterID string - nfsDriverName string + deployTimeout int + deployCephFS bool + deployRBD bool + deployNFS bool + testCephFS bool + testCephFSFscrypt bool + testRBD bool + testRBDFSCrypt bool + testNBD bool + testNFS bool + helmTest bool + upgradeTesting bool + upgradeVersion string + cephCSINamespace string + rookNamespace string + radosNamespace string + poll = 2 * time.Second + isOpenShift bool + clusterID string + nfsDriverName string + operatorDeployment bool ) type cephfsFilesystem struct {