From 7d3bff06543369618a18b57fe69f8d506681146d Mon Sep 17 00:00:00 2001 From: Madhu Rajanna Date: Tue, 8 Dec 2020 16:12:31 +0530 Subject: [PATCH] e2e: enable topology based provisioning as we are testing the topology based provisioning in our E2E, we need to set topology=true in E2E. Signed-off-by: Madhu Rajanna --- e2e/rbd.go | 1 + e2e/utils.go | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/e2e/rbd.go b/e2e/rbd.go index 4f866a545..00c4eeced 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -71,6 +71,7 @@ func createORDeleteRbdResouces(action string) { e2elog.Failf("failed to read content from %s with error %v", rbdDirPath+rbdProvisioner, err) } data = oneReplicaDeployYaml(data) + data = enableTopologyInTemplate(data) _, err = framework.RunKubectlInput(cephCSINamespace, data, action, ns, "-f", "-") if err != nil { e2elog.Failf("failed to %s rbd provisioner with error %v", action, err) diff --git a/e2e/utils.go b/e2e/utils.go index 8183f5f66..c45d07467 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -505,6 +505,10 @@ func oneReplicaDeployYaml(template string) string { return re.ReplaceAllString(template, `$1 1`) } +func enableTopologyInTemplate(data string) string { + return strings.ReplaceAll(data, "--feature-gates=Topology=false", "--feature-gates=Topology=true") +} + func validatePVCClone(sourcePvcPath, clonePvcPath, clonePvcAppPath string, f *framework.Framework) { var wg sync.WaitGroup totalCount := 10