Fixes 'Zone is empty' errors in PD upgrade tests; skips pd tests with inline volume in multizone clusters
This commit is contained in:
@@ -348,6 +348,16 @@ func SkipUnlessMultizone(c clientset.Interface) {
|
||||
}
|
||||
}
|
||||
|
||||
func SkipIfMultizone(c clientset.Interface) {
|
||||
zones, err := GetClusterZones(c)
|
||||
if err != nil {
|
||||
Skipf("Error listing cluster zones")
|
||||
}
|
||||
if zones.Len() > 1 {
|
||||
Skipf("Requires more than one zone")
|
||||
}
|
||||
}
|
||||
|
||||
func SkipUnlessClusterMonitoringModeIs(supportedMonitoring ...string) {
|
||||
if !ClusterMonitoringModeIs(supportedMonitoring...) {
|
||||
Skipf("Only next monitoring modes are supported %v (not %s)", supportedMonitoring, TestContext.ClusterMonitoringMode)
|
||||
|
Reference in New Issue
Block a user