@@ -82,13 +82,21 @@ func failIfIncorrectPortgroupsAttachedToVMs(
82
82
}
83
83
84
84
func failIfNodeNetworkingInconsistentWithMachineNetwork (infra configv1.PlatformSpec , machineNetworks []string ) {
85
+ // This can happen in scenarios where multinetwork is not enabled.
86
+ if len (infra .VSphere .NodeNetworking .External .NetworkSubnetCIDR ) == 0 ||
87
+ len (infra .VSphere .NodeNetworking .Internal .NetworkSubnetCIDR ) == 0 {
88
+ Skip ("skipping test due to incomplete config" )
89
+ }
90
+
85
91
internalNodeNetworking := infra .VSphere .NodeNetworking .Internal
86
92
externalNodeNetworking := infra .VSphere .NodeNetworking .External
87
93
94
+ // machineNetworks contain the VIPs now so we'll need to check each network to see if we find one that matches internal/external.
88
95
By ("comparing nodeNetworking slices to the machine network" )
89
96
for _ , nodeNetworkingSpec := range []configv1.VSpherePlatformNodeNetworkingSpec {internalNodeNetworking , externalNodeNetworking } {
90
- slices .Sort (nodeNetworkingSpec .NetworkSubnetCIDR )
91
- Expect (slices .Equal (nodeNetworkingSpec .NetworkSubnetCIDR , machineNetworks )).To (BeTrue ())
97
+ for _ , network := range nodeNetworkingSpec .NetworkSubnetCIDR {
98
+ Expect (slices .Contains (machineNetworks , network )).To (BeTrue ())
99
+ }
92
100
}
93
101
}
94
102
@@ -126,7 +134,7 @@ func failIfMachineDoesNotHaveAllPortgroups(machine machinev1beta1.Machine, failu
126
134
Expect (slices .Equal (expectedPortgroups , portgroups )).To (BeTrue ())
127
135
}
128
136
129
- var _ = Describe ("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][platform:vsphere] Managed cluster should" , func () {
137
+ var _ = Describe ("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][platform:vsphere] Managed cluster should" , Label ( "Conformance" ), func () {
130
138
defer GinkgoRecover ()
131
139
ctx := context .Background ()
132
140
@@ -190,24 +198,24 @@ var _ = Describe("[sig-cluster-lifecycle][OCPFeatureGate:VSphereMultiNetworks][p
190
198
}
191
199
})
192
200
193
- It ("node addresses should be correlated with the machine network" , func () {
201
+ It ("node addresses should be correlated with the machine network [apigroup:machine.openshift.io][Suite:openshift/conformance/parallel] " , func () {
194
202
By ("checking for correlation between node internal/external IPs and the machine network" )
195
203
failIfNodeNotInMachineNetwork (* nodes , machineNetworks )
196
204
})
197
205
198
- It ("machine network should be correlated with node networking" , func () {
206
+ It ("machine network should be correlated with node networking [apigroup:machine.openshift.io][Suite:openshift/conformance/parallel] " , func () {
199
207
failIfNodeNetworkingInconsistentWithMachineNetwork (infra .Spec .PlatformSpec , machineNetworks )
200
208
})
201
209
202
- It ("machines should have all specified portgroup associated with their failure domain" , func () {
210
+ It ("machines should have all specified portgroup associated with their failure domain [apigroup:machine.openshift.io][Suite:openshift/conformance/parallel] " , func () {
203
211
failIfMachinesDoNotHaveAllPortgroups (infra .Spec .PlatformSpec , machines )
204
212
})
205
213
206
- It ("node VMs should have all specified portgroups attached which are associated with their failure domain" , func () {
214
+ It ("node VMs should have all specified portgroups attached which are associated with their failure domain [apigroup:machine.openshift.io][Suite:openshift/conformance/parallel] " , func () {
207
215
failIfIncorrectPortgroupsAttachedToVMs (ctx , infra .Spec .PlatformSpec , nodes , vsphereCreds )
208
216
})
209
217
210
- It ("new machines should pass multi network tests" , func () {
218
+ It ("new machines should pass multi network tests [apigroup:machine.openshift.io][Suite:openshift/conformance/parallel] " , func () {
211
219
machineSets , err := e2eutil .GetMachineSets (cfg )
212
220
Expect (err ).NotTo (HaveOccurred ())
213
221
0 commit comments