Skip to content

Commit d437b3c

Browse files
author
Danil-Grigorev
committed
Update tests with manual defaulting of kubebuilder infrastructure fields
1 parent 83f8a93 commit d437b3c

1 file changed

Lines changed: 15 additions & 5 deletions

File tree

controllers/clusteroperator_controller_test.go

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -312,7 +312,9 @@ var _ = Describe("Component sync controller", func() {
312312
},
313313
Entry("Should provision AWS resources", testCase{
314314
status: &configv1.InfrastructureStatus{
315-
Platform: configv1.AWSPlatformType,
315+
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
316+
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
317+
Platform: configv1.AWSPlatformType,
316318
PlatformStatus: &configv1.PlatformStatus{
317319
Type: configv1.AWSPlatformType,
318320
},
@@ -326,7 +328,9 @@ var _ = Describe("Component sync controller", func() {
326328
}),
327329
Entry("Should provision OpenStack resources", testCase{
328330
status: &configv1.InfrastructureStatus{
329-
Platform: configv1.OpenStackPlatformType,
331+
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
332+
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
333+
Platform: configv1.OpenStackPlatformType,
330334
PlatformStatus: &configv1.PlatformStatus{
331335
Type: configv1.OpenStackPlatformType,
332336
},
@@ -340,7 +344,9 @@ var _ = Describe("Component sync controller", func() {
340344
}),
341345
Entry("Should not provision resources for currently unsupported platform", testCase{
342346
status: &configv1.InfrastructureStatus{
343-
Platform: configv1.IBMCloudPlatformType,
347+
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
348+
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
349+
Platform: configv1.IBMCloudPlatformType,
344350
PlatformStatus: &configv1.PlatformStatus{
345351
Type: configv1.IBMCloudPlatformType,
346352
},
@@ -349,15 +355,19 @@ var _ = Describe("Component sync controller", func() {
349355
}),
350356
Entry("Should not provision resources for AWS if external FeatureGate is not present", testCase{
351357
status: &configv1.InfrastructureStatus{
352-
Platform: configv1.AWSPlatformType,
358+
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
359+
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
360+
Platform: configv1.AWSPlatformType,
353361
PlatformStatus: &configv1.PlatformStatus{
354362
Type: configv1.AWSPlatformType,
355363
},
356364
},
357365
}),
358366
Entry("Should not provision resources for OpenStack if external FeatureGate is not present", testCase{
359367
status: &configv1.InfrastructureStatus{
360-
Platform: configv1.OpenStackPlatformType,
368+
InfrastructureTopology: configv1.HighlyAvailableTopologyMode,
369+
ControlPlaneTopology: configv1.HighlyAvailableTopologyMode,
370+
Platform: configv1.OpenStackPlatformType,
361371
PlatformStatus: &configv1.PlatformStatus{
362372
Type: configv1.OpenStackPlatformType,
363373
},

0 commit comments

Comments
 (0)