From 17fea0459dbac2564f9610ab1d7d8a239cbbd721 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Tue, 12 Apr 2022 17:14:35 +0200 Subject: [PATCH] e2e: add `-nfs-driver=...` option to select provisioner When testing NFS-provisioning on a cluster that has an NFS-provisioner and node-plugins deployed with a different driver-name, it is very useful to have a commandline option to change the name of the provisioner that is placed in the StorageClass. Signed-off-by: Niels de Vos --- e2e/README.md | 1 + e2e/e2e_test.go | 1 + e2e/utils.go | 1 + 3 files changed, 3 insertions(+) diff --git a/e2e/README.md b/e2e/README.md index 3436aca6b..79a73983a 100644 --- a/e2e/README.md +++ b/e2e/README.md @@ -104,6 +104,7 @@ are available while running tests: | is-openshift | Run in OpenShift compatibility mode, skips certain new feature tests | | filesystem | Name of the CephFS filesystem (default: "myfs") | | clusterid | Use the Ceph cluster id in the StorageClasses and SnapshotClasses (default: `ceph fsid` detected) | +| nfs-driver | Name of the driver to use for provisioning NFS-volumes (default: "nfs.csi.ceph.com") | ## E2E for snapshot diff --git a/e2e/e2e_test.go b/e2e/e2e_test.go index 1f3a8f6ca..b7125c401 100644 --- a/e2e/e2e_test.go +++ b/e2e/e2e_test.go @@ -48,6 +48,7 @@ func init() { flag.BoolVar(&isOpenShift, "is-openshift", false, "disables certain checks on OpenShift") 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") setDefaultKubeconfig() // Register framework flags, then handle flags diff --git a/e2e/utils.go b/e2e/utils.go index 7f51c9043..d3e296477 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -82,6 +82,7 @@ var ( poll = 2 * time.Second isOpenShift bool clusterID string + nfsDriverName string ) func getMons(ns string, c kubernetes.Interface) ([]string, error) {