@@ -78,12 +78,14 @@ func TestReconcileMachinePoolPhases(t *testing.T) {
78
78
APIVersion : builder .BootstrapGroupVersion .String (),
79
79
Kind : builder .TestBootstrapConfigKind ,
80
80
Name : "bootstrap-config1" ,
81
+ Namespace : metav1 .NamespaceDefault ,
81
82
},
82
83
},
83
84
InfrastructureRef : corev1.ObjectReference {
84
85
APIVersion : builder .InfrastructureGroupVersion .String (),
85
86
Kind : builder .TestInfrastructureMachineTemplateKind ,
86
87
Name : "infra-config1" ,
88
+ Namespace : metav1 .NamespaceDefault ,
87
89
},
88
90
},
89
91
},
@@ -808,6 +810,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) {
808
810
APIVersion : builder .BootstrapGroupVersion .String (),
809
811
Kind : builder .TestBootstrapConfigKind ,
810
812
Name : "bootstrap-config1" ,
813
+ Namespace : metav1 .NamespaceDefault ,
811
814
},
812
815
},
813
816
},
@@ -949,6 +952,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) {
949
952
APIVersion : builder .BootstrapGroupVersion .String (),
950
953
Kind : builder .TestBootstrapConfigKind ,
951
954
Name : "bootstrap-config1" ,
955
+ Namespace : metav1 .NamespaceDefault ,
952
956
},
953
957
DataSecretName : ptr .To ("data" ),
954
958
},
@@ -1032,6 +1036,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) {
1032
1036
APIVersion : builder .BootstrapGroupVersion .String (),
1033
1037
Kind : builder .TestBootstrapConfigKind ,
1034
1038
Name : "bootstrap-config1" ,
1039
+ Namespace : metav1 .NamespaceDefault ,
1035
1040
},
1036
1041
DataSecretName : ptr .To ("data" ),
1037
1042
},
@@ -1107,12 +1112,14 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) {
1107
1112
APIVersion : builder .BootstrapGroupVersion .String (),
1108
1113
Kind : builder .TestBootstrapConfigKind ,
1109
1114
Name : "bootstrap-config1" ,
1115
+ Namespace : metav1 .NamespaceDefault ,
1110
1116
},
1111
1117
},
1112
1118
InfrastructureRef : corev1.ObjectReference {
1113
1119
APIVersion : builder .InfrastructureGroupVersion .String (),
1114
1120
Kind : builder .TestInfrastructureMachineTemplateKind ,
1115
1121
Name : "infra-config1" ,
1122
+ Namespace : metav1 .NamespaceDefault ,
1116
1123
},
1117
1124
},
1118
1125
},
@@ -1186,12 +1193,14 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) {
1186
1193
APIVersion : builder .BootstrapGroupVersion .String (),
1187
1194
Kind : builder .TestBootstrapConfigKind ,
1188
1195
Name : "bootstrap-config1" ,
1196
+ Namespace : metav1 .NamespaceDefault ,
1189
1197
},
1190
1198
},
1191
1199
InfrastructureRef : corev1.ObjectReference {
1192
1200
APIVersion : builder .InfrastructureGroupVersion .String (),
1193
1201
Kind : builder .TestInfrastructureMachineTemplateKind ,
1194
1202
Name : "infra-config1" ,
1203
+ Namespace : metav1 .NamespaceDefault ,
1195
1204
},
1196
1205
},
1197
1206
},
@@ -1245,12 +1254,14 @@ func TestReconcileMachinePoolInfrastructure(t *testing.T) {
1245
1254
APIVersion : builder .BootstrapGroupVersion .String (),
1246
1255
Kind : builder .TestBootstrapConfigKind ,
1247
1256
Name : "bootstrap-config1" ,
1257
+ Namespace : metav1 .NamespaceDefault ,
1248
1258
},
1249
1259
},
1250
1260
InfrastructureRef : corev1.ObjectReference {
1251
1261
APIVersion : builder .InfrastructureGroupVersion .String (),
1252
1262
Kind : builder .TestInfrastructureMachineTemplateKind ,
1253
1263
Name : "infra-config1" ,
1264
+ Namespace : metav1 .NamespaceDefault ,
1254
1265
},
1255
1266
},
1256
1267
},
@@ -1437,7 +1448,7 @@ func TestReconcileMachinePoolMachines(t *testing.T) {
1437
1448
g .Expect (machineList .Items ).To (HaveLen (2 ))
1438
1449
for i := range machineList .Items {
1439
1450
machine := & machineList .Items [i ]
1440
- _ , err := external .Get (ctx , r .Client , & machine .Spec .InfrastructureRef , machine . Namespace )
1451
+ _ , err := external .Get (ctx , r .Client , & machine .Spec .InfrastructureRef )
1441
1452
g .Expect (err ).ToNot (HaveOccurred ())
1442
1453
}
1443
1454
})
@@ -1508,7 +1519,7 @@ func TestReconcileMachinePoolMachines(t *testing.T) {
1508
1519
g .Expect (machineList .Items ).To (HaveLen (2 ))
1509
1520
for i := range machineList .Items {
1510
1521
machine := & machineList .Items [i ]
1511
- _ , err := external .Get (ctx , r .Client , & machine .Spec .InfrastructureRef , machine . Namespace )
1522
+ _ , err := external .Get (ctx , r .Client , & machine .Spec .InfrastructureRef )
1512
1523
g .Expect (err ).ToNot (HaveOccurred ())
1513
1524
}
1514
1525
})
@@ -1755,12 +1766,14 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
1755
1766
APIVersion : builder .BootstrapGroupVersion .String (),
1756
1767
Kind : builder .TestBootstrapConfigKind ,
1757
1768
Name : "bootstrap-config1" ,
1769
+ Namespace : ns .Name ,
1758
1770
},
1759
1771
},
1760
1772
InfrastructureRef : corev1.ObjectReference {
1761
1773
APIVersion : builder .InfrastructureGroupVersion .String (),
1762
1774
Kind : builder .TestInfrastructureMachineTemplateKind ,
1763
1775
Name : "infra-config1" ,
1776
+ Namespace : ns .Name ,
1764
1777
},
1765
1778
},
1766
1779
},
@@ -2181,12 +2194,14 @@ func getMachinePool(replicas int, mpName, clusterName, nsName string) expv1.Mach
2181
2194
APIVersion : builder .BootstrapGroupVersion .String (),
2182
2195
Kind : builder .GenericBootstrapConfigKind ,
2183
2196
Name : "bootstrap-config1" ,
2197
+ Namespace : nsName ,
2184
2198
},
2185
2199
},
2186
2200
InfrastructureRef : corev1.ObjectReference {
2187
2201
APIVersion : builder .InfrastructureGroupVersion .String (),
2188
2202
Kind : builder .GenericInfrastructureMachineKind ,
2189
2203
Name : "infra-config1" ,
2204
+ Namespace : nsName ,
2190
2205
},
2191
2206
},
2192
2207
},
0 commit comments