Skip generic ephemeral tests if Immediate binding and topology keys set

This commit is contained in:
Mauricio Poppe 2022-05-05 23:15:51 +00:00
parent 1234d061c0
commit 538fd832aa

View File

@ -111,6 +111,7 @@ func (p *ephemeralTestSuite) DefineTests(driver storageframework.TestDriver, pat
resource *storageframework.VolumeResource resource *storageframework.VolumeResource
} }
var ( var (
dInfo = driver.GetDriverInfo()
eDriver storageframework.EphemeralTestDriver eDriver storageframework.EphemeralTestDriver
l local l local
) )
@ -134,6 +135,11 @@ func (p *ephemeralTestSuite) DefineTests(driver storageframework.TestDriver, pat
e2eskipper.Skipf("Cluster doesn't support %q volumes -- skipping", pattern.VolType) e2eskipper.Skipf("Cluster doesn't support %q volumes -- skipping", pattern.VolType)
} }
} }
// A driver might support the Topology capability which is incompatible with the VolumeBindingMode immediate because
// volumes might be provisioned immediately in a different zone to where the workload is located.
if pattern.BindingMode == storagev1.VolumeBindingImmediate && len(dInfo.TopologyKeys) > 0 {
e2eskipper.Skipf("VolumeBindingMode immediate is not compatible with a multi-topology environment.")
}
l = local{} l = local{}