@@ -2200,12 +2200,12 @@ func TestRenderOVNKubernetesEnableIPsec(t *testing.T) {
22002200 t .Errorf ("The MachineConfig %s must exist, but it's not available" , workerMachineConfigIPsecExtName )
22012201 }
22022202
2203- bootstrapResult .Infra .MasterIPsecMachineConfig = & mcfgv1.MachineConfig {}
2204- bootstrapResult .Infra .MasterIPsecMachineConfig .Name = masterMachineConfigIPsecExtName
2205- bootstrapResult .Infra .MasterIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2206- bootstrapResult .Infra .WorkerIPsecMachineConfig = & mcfgv1.MachineConfig {}
2207- bootstrapResult .Infra .WorkerIPsecMachineConfig .Name = workerMachineConfigIPsecExtName
2208- bootstrapResult .Infra .WorkerIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2203+ bootstrapResult .Infra .MasterIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2204+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .Name = masterMachineConfigIPsecExtName
2205+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
2206+ bootstrapResult .Infra .WorkerIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2207+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .Name = workerMachineConfigIPsecExtName
2208+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
22092209 objs , _ , err = renderOVNKubernetes (config , bootstrapResult , manifestDirOvn , fakeClient , featureGatesCNO )
22102210 if err != nil {
22112211 t .Errorf ("Unexpected error: %v" , err )
@@ -2470,14 +2470,13 @@ func TestRenderOVNKubernetesIPsecUpgradeWithMachineConfig(t *testing.T) {
24702470 },
24712471 }
24722472
2473- // Start the upgrade and it's going rollout only ovn-ipsec-host DS without any changes into
2474- // installed IPsec MachineConfigs.
2473+ // Start the upgrade and it's going rollout ovn-ipsec-host DS with CNO IPsec MachineConfigs.
24752474 bootstrapResult .Infra = bootstrap.InfraStatus {}
24762475 bootstrapResult .Infra .MachineConfigClusterOperatorReady = true
2477- bootstrapResult .Infra .MasterIPsecMachineConfig = & mcfgv1.MachineConfig {}
2478- bootstrapResult .Infra .MasterIPsecMachineConfig .Name = masterMachineConfigIPsecExtName
2479- bootstrapResult .Infra .WorkerIPsecMachineConfig = & mcfgv1.MachineConfig {}
2480- bootstrapResult .Infra .WorkerIPsecMachineConfig .Name = workerMachineConfigIPsecExtName
2476+ bootstrapResult .Infra .MasterIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2477+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .Name = masterMachineConfigIPsecExtName
2478+ bootstrapResult .Infra .WorkerIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2479+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .Name = workerMachineConfigIPsecExtName
24812480 bootstrapResult .Infra .MasterMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
24822481 Configuration : mcfgv1.MachineConfigPoolStatusConfiguration {Source : []v1.ObjectReference {{Name : masterMachineConfigIPsecExtName }}}}
24832482 bootstrapResult .Infra .WorkerMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
@@ -2491,12 +2490,12 @@ func TestRenderOVNKubernetesIPsecUpgradeWithMachineConfig(t *testing.T) {
24912490 }
24922491 // Ensure renderOVNKubernetes doesn't roll out its own MachineConfigs
24932492 renderedMasterIPsecExtension := findInObjs ("machineconfiguration.openshift.io" , "MachineConfig" , masterMachineConfigIPsecExtName , "" , objs )
2494- if renderedMasterIPsecExtension ! = nil {
2495- t .Errorf ("The MachineConfig %s must not exist, but it's available" , masterMachineConfigIPsecExtName )
2493+ if renderedMasterIPsecExtension = = nil {
2494+ t .Errorf ("The MachineConfig %s must exist, but it's not available" , masterMachineConfigIPsecExtName )
24962495 }
24972496 renderedWorkerIPsecExtension := findInObjs ("machineconfiguration.openshift.io" , "MachineConfig" , workerMachineConfigIPsecExtName , "" , objs )
2498- if renderedWorkerIPsecExtension ! = nil {
2499- t .Errorf ("The MachineConfig %s must not exist, but it's available" , workerMachineConfigIPsecExtName )
2497+ if renderedWorkerIPsecExtension = = nil {
2498+ t .Errorf ("The MachineConfig %s must exist, but it's not available" , workerMachineConfigIPsecExtName )
25002499 }
25012500 // Ensure only ipsec host daemonset exists now.
25022501 renderedIPsec := findInObjs ("apps" , "DaemonSet" , "ovn-ipsec-host" , "openshift-ovn-kubernetes" , objs )
@@ -2636,12 +2635,12 @@ func TestRenderOVNKubernetesIPsecUpgradeWithNoMachineConfig(t *testing.T) {
26362635 }
26372636
26382637 // After IPsec Machine Configs rollout is complete, it must have only ovn-ipsec-host DS.
2639- bootstrapResult .Infra .MasterIPsecMachineConfig = & mcfgv1.MachineConfig {}
2640- bootstrapResult .Infra .MasterIPsecMachineConfig .Name = masterMachineConfigIPsecExtName
2641- bootstrapResult .Infra .MasterIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2642- bootstrapResult .Infra .WorkerIPsecMachineConfig = & mcfgv1.MachineConfig {}
2643- bootstrapResult .Infra .WorkerIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2644- bootstrapResult .Infra .WorkerIPsecMachineConfig .Name = workerMachineConfigIPsecExtName
2638+ bootstrapResult .Infra .MasterIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2639+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .Name = masterMachineConfigIPsecExtName
2640+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
2641+ bootstrapResult .Infra .WorkerIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2642+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
2643+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .Name = workerMachineConfigIPsecExtName
26452644 bootstrapResult .Infra .MasterMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
26462645 Configuration : mcfgv1.MachineConfigPoolStatusConfiguration {Source : []v1.ObjectReference {{Name : masterMachineConfigIPsecExtName }}}}
26472646 bootstrapResult .Infra .WorkerMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
@@ -2858,12 +2857,12 @@ func TestRenderOVNKubernetesDisableIPsec(t *testing.T) {
28582857 fakeClient := cnofake .NewFakeClient ()
28592858 bootstrapResult .Infra = bootstrap.InfraStatus {}
28602859 bootstrapResult .Infra .MachineConfigClusterOperatorReady = true
2861- bootstrapResult .Infra .MasterIPsecMachineConfig = & mcfgv1.MachineConfig {}
2862- bootstrapResult .Infra .MasterIPsecMachineConfig .Name = masterMachineConfigIPsecExtName
2863- bootstrapResult .Infra .MasterIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2864- bootstrapResult .Infra .WorkerIPsecMachineConfig = & mcfgv1.MachineConfig {}
2865- bootstrapResult .Infra .WorkerIPsecMachineConfig .Name = workerMachineConfigIPsecExtName
2866- bootstrapResult .Infra .WorkerIPsecMachineConfig .OwnerReferences = networkOwnerRef ()
2860+ bootstrapResult .Infra .MasterIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2861+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .Name = masterMachineConfigIPsecExtName
2862+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
2863+ bootstrapResult .Infra .WorkerIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2864+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .Name = workerMachineConfigIPsecExtName
2865+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .OwnerReferences = networkOwnerRef ()
28672866 bootstrapResult .Infra .MasterMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
28682867 Configuration : mcfgv1.MachineConfigPoolStatusConfiguration {Source : []v1.ObjectReference {{Name : masterMachineConfigIPsecExtName }}}}
28692868 bootstrapResult .Infra .WorkerMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
@@ -2991,10 +2990,10 @@ func TestRenderOVNKubernetesDisableIPsecWithUserInstalledIPsecMachineConfigs(t *
29912990
29922991 fakeClient := cnofake .NewFakeClient ()
29932992 bootstrapResult .Infra = bootstrap.InfraStatus {}
2994- bootstrapResult .Infra .MasterIPsecMachineConfig = & mcfgv1.MachineConfig {}
2995- bootstrapResult .Infra .MasterIPsecMachineConfig .Name = masterMachineConfigIPsecExtName
2996- bootstrapResult .Infra .WorkerIPsecMachineConfig = & mcfgv1.MachineConfig {}
2997- bootstrapResult .Infra .WorkerIPsecMachineConfig .Name = workerMachineConfigIPsecExtName
2993+ bootstrapResult .Infra .MasterIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2994+ bootstrapResult .Infra .MasterIPsecMachineConfigs [ 0 ] .Name = masterMachineConfigIPsecExtName
2995+ bootstrapResult .Infra .WorkerIPsecMachineConfigs = [] * mcfgv1.MachineConfig {{} }
2996+ bootstrapResult .Infra .WorkerIPsecMachineConfigs [ 0 ] .Name = workerMachineConfigIPsecExtName
29982997 bootstrapResult .Infra .MasterMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
29992998 Configuration : mcfgv1.MachineConfigPoolStatusConfiguration {Source : []v1.ObjectReference {{Name : masterMachineConfigIPsecExtName }}}}
30002999 bootstrapResult .Infra .WorkerMCPStatus = mcfgv1.MachineConfigPoolStatus {MachineCount : 1 , ReadyMachineCount : 1 ,
0 commit comments