@@ -169,13 +169,13 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
169
169
vsphereCreds , err = c .CoreV1 ().Secrets ("kube-system" ).Get (ctx , "vsphere-creds" , v1.GetOptions {})
170
170
Expect (err ).NotTo (HaveOccurred ())
171
171
172
- Expect (len (infra .Spec .PlatformSpec .VSphere .FailureDomains ) >= 1 )
172
+ Expect (len (infra .Spec .PlatformSpec .VSphere .FailureDomains )). ShouldNot ( Equal ( 0 ) )
173
173
174
174
for _ , machineNetwork := range infra .Spec .PlatformSpec .VSphere .MachineNetworks {
175
175
machineNetworks = append (machineNetworks , string (machineNetwork ))
176
176
}
177
177
178
- Expect (len (machineNetworks ) >= 1 )
178
+ Expect (len (machineNetworks )). ShouldNot ( Equal ( 0 ) )
179
179
slices .Sort (machineNetworks )
180
180
181
181
nodes , err = c .CoreV1 ().Nodes ().List (ctx , v1.ListOptions {})
@@ -184,6 +184,11 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
184
184
machines , err = mc .Machines ("openshift-machine-api" ).List (ctx , v1.ListOptions {})
185
185
Expect (err ).NotTo (HaveOccurred ())
186
186
187
+ // If we have no machines, this normally means UPI install. Normally IPI would have machines for at least the control plane.
188
+ if len (machines .Items ) == 0 {
189
+ Skip ("skipping due to lack of machines / UPI cluster" )
190
+ }
191
+
187
192
portGroups := make (map [string ]any )
188
193
for _ , machine := range machines .Items {
189
194
providerSpec , err := vsphere .ProviderSpecFromRawExtension (machine .Spec .ProviderSpec .Value )
@@ -220,7 +225,7 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
220
225
machineSets , err := e2eutil .GetMachineSets (cfg )
221
226
Expect (err ).NotTo (HaveOccurred ())
222
227
223
- Expect (len (machineSets .Items ) >= 1 )
228
+ Expect (len (machineSets .Items )). ShouldNot ( Equal ( 0 ) )
224
229
225
230
machineSet := machineSets .Items [0 ]
226
231
0 commit comments