Skip to content

Commit

Permalink
e2e: update e2e test for topologysc
Browse files Browse the repository at this point in the history
Signed-off-by: parth-gr <[email protected]>
  • Loading branch information
parth-gr committed Mar 19, 2024
1 parent 7a2be75 commit c889a3e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion e2e/rbd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down
4 changes: 2 additions & 2 deletions internal/rbd/rbd_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down

0 comments on commit c889a3e

Please sign in to comment.