From c889a3e0b31b78df6455736736d1b16ff55298c4 Mon Sep 17 00:00:00 2001 From: parth-gr Date: Fri, 15 Mar 2024 21:26:18 +0530 Subject: [PATCH] e2e: update e2e test for topologysc Signed-off-by: parth-gr --- e2e/rbd.go | 2 +- internal/rbd/rbd_util.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/e2e/rbd.go b/e2e/rbd.go index e4c320c26d60..60027fdf4d4c 100644 --- a/e2e/rbd.go +++ b/e2e/rbd.go @@ -3014,7 +3014,7 @@ var _ = Describe("RBD", func() { "{\"domainLabel\":\"zone\",\"value\":\"" + zoneValue + "\"}]}]" err = createRBDStorageClass(f.ClientSet, f, defaultSCName, map[string]string{"volumeBindingMode": "WaitForFirstConsumer"}, - map[string]string{"topologyConstrainedPools": topologyConstraint}, deletePolicy) + map[string]string{"topologyConstrainedPools": topologyConstraint, "pool": ""}, deletePolicy) if err != nil { framework.Failf("failed to create storageclass: %v", err) } diff --git a/internal/rbd/rbd_util.go b/internal/rbd/rbd_util.go index 08f9f759889a..495a60f699b0 100644 --- a/internal/rbd/rbd_util.go +++ b/internal/rbd/rbd_util.go @@ -1271,8 +1271,8 @@ func genVolFromVolumeOptions( rbdVol := &rbdVolume{} rbdVol.Pool, ok = volOptions["pool"] - if !ok { - return nil, errors.New("missing required parameter pool") + if _, ok = volOptions["topologyConstrainedPools"]; !ok { + return nil, errors.New("empty pool name or topologyConstrainedPools to provision volume") } rbdVol.DataPool = volOptions["dataPool"]