@@ -169,13 +169,13 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
169169 vsphereCreds , err = c .CoreV1 ().Secrets ("kube-system" ).Get (ctx , "vsphere-creds" , v1.GetOptions {})
170170 Expect (err ).NotTo (HaveOccurred ())
171171
172- Expect (len (infra .Spec .PlatformSpec .VSphere .FailureDomains ) >= 1 )
172+ Expect (len (infra .Spec .PlatformSpec .VSphere .FailureDomains )). ShouldNot ( Equal ( 0 ) )
173173
174174 for _ , machineNetwork := range infra .Spec .PlatformSpec .VSphere .MachineNetworks {
175175 machineNetworks = append (machineNetworks , string (machineNetwork ))
176176 }
177177
178- Expect (len (machineNetworks ) >= 1 )
178+ Expect (len (machineNetworks )). ShouldNot ( Equal ( 0 ) )
179179 slices .Sort (machineNetworks )
180180
181181 nodes , err = c .CoreV1 ().Nodes ().List (ctx , v1.ListOptions {})
@@ -184,6 +184,11 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
184184 machines , err = mc .Machines ("openshift-machine-api" ).List (ctx , v1.ListOptions {})
185185 Expect (err ).NotTo (HaveOccurred ())
186186
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+
187192 portGroups := make (map [string ]any )
188193 for _ , machine := range machines .Items {
189194 providerSpec , err := vsphere .ProviderSpecFromRawExtension (machine .Spec .ProviderSpec .Value )
@@ -220,7 +225,7 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
220225 machineSets , err := e2eutil .GetMachineSets (cfg )
221226 Expect (err ).NotTo (HaveOccurred ())
222227
223- Expect (len (machineSets .Items ) >= 1 )
228+ Expect (len (machineSets .Items )). ShouldNot ( Equal ( 0 ) )
224229
225230 machineSet := machineSets .Items [0 ]
226231
0 commit comments