@@ -187,14 +187,14 @@ func TestMachineTemplateUpToDate(t *testing.T) {
187
187
InfrastructureRef : corev1.ObjectReference {
188
188
Name : "infra1" ,
189
189
Namespace : "default" ,
190
- Kind : "InfrastructureMachine " ,
190
+ Kind : "InfrastructureMachineTemplate " ,
191
191
APIVersion : "infrastructure.cluster.x-k8s.io/v1beta1" ,
192
192
},
193
193
Bootstrap : clusterv1.Bootstrap {
194
194
ConfigRef : & corev1.ObjectReference {
195
195
Name : "bootstrap1" ,
196
196
Namespace : "default" ,
197
- Kind : "BootstrapConfig " ,
197
+ Kind : "BootstrapConfigTemplate " ,
198
198
APIVersion : "bootstrap.cluster.x-k8s.io/v1beta1" ,
199
199
},
200
200
},
@@ -320,8 +320,8 @@ func TestMachineTemplateUpToDate(t *testing.T) {
320
320
current : machineTemplate ,
321
321
desired : machineTemplateWithDifferentInfraRef ,
322
322
expectedUpToDate : false ,
323
- expectedLogMessages1 : []string {"spec.infrastructureRef InfrastructureMachine/ infra1, InfrastructureMachine/ infra2 required" },
324
- expectedLogMessages2 : []string {"spec.infrastructureRef InfrastructureMachine/ infra2, InfrastructureMachine/ infra1 required" },
323
+ expectedLogMessages1 : []string {"spec.infrastructureRef InfrastructureMachineTemplate infra1, InfrastructureMachineTemplate infra2 required" },
324
+ expectedLogMessages2 : []string {"spec.infrastructureRef InfrastructureMachineTemplate infra2, InfrastructureMachineTemplate infra1 required" },
325
325
expectedConditionMessages1 : []string {"InfrastructureMachine is not up-to-date" },
326
326
expectedConditionMessages2 : []string {"InfrastructureMachine is not up-to-date" },
327
327
},
@@ -340,8 +340,8 @@ func TestMachineTemplateUpToDate(t *testing.T) {
340
340
current : machineTemplate ,
341
341
desired : machineTemplateWithDifferentBootstrapConfigRef ,
342
342
expectedUpToDate : false ,
343
- expectedLogMessages1 : []string {"spec.bootstrap.configRef BootstrapConfig/ bootstrap1, BootstrapConfig/ bootstrap2 required" },
344
- expectedLogMessages2 : []string {"spec.bootstrap.configRef BootstrapConfig/ bootstrap2, BootstrapConfig/ bootstrap1 required" },
343
+ expectedLogMessages1 : []string {"spec.bootstrap.configRef BootstrapConfigTemplate bootstrap1, BootstrapConfigTemplate bootstrap2 required" },
344
+ expectedLogMessages2 : []string {"spec.bootstrap.configRef BootstrapConfigTemplate bootstrap2, BootstrapConfigTemplate bootstrap1 required" },
345
345
expectedConditionMessages1 : []string {"BootstrapConfig is not up-to-date" },
346
346
expectedConditionMessages2 : []string {"BootstrapConfig is not up-to-date" },
347
347
},
@@ -350,7 +350,7 @@ func TestMachineTemplateUpToDate(t *testing.T) {
350
350
current : machineTemplate ,
351
351
desired : machineTemplateWithBootstrapDataSecret ,
352
352
expectedUpToDate : false ,
353
- expectedLogMessages1 : []string {"spec.bootstrap.configRef BootstrapConfig/ bootstrap1, / required" },
353
+ expectedLogMessages1 : []string {"spec.bootstrap.configRef BootstrapConfigTemplate bootstrap1, required" },
354
354
expectedLogMessages2 : []string {"spec.bootstrap.dataSecretName data-secret1, nil required" },
355
355
expectedConditionMessages1 : []string {"BootstrapConfig is not up-to-date" },
356
356
expectedConditionMessages2 : []string {"spec.bootstrap.dataSecretName data-secret1, nil required" },
@@ -398,6 +398,7 @@ func TestFindNewMachineSet(t *testing.T) {
398
398
twoAfterRolloutAfter := metav1 .NewTime (oneAfterRolloutAfter .Add (time .Minute ))
399
399
400
400
deployment := generateDeployment ("nginx" )
401
+ deployment .Spec .Template .Spec .InfrastructureRef .Kind = "InfrastructureMachineTemplate"
401
402
deployment .Spec .Template .Spec .InfrastructureRef .Name = "new-infra-ref"
402
403
403
404
deploymentWithRolloutAfter := deployment .DeepCopy ()
@@ -458,7 +459,7 @@ func TestFindNewMachineSet(t *testing.T) {
458
459
deployment : deployment ,
459
460
msList : []* clusterv1.MachineSet {& oldMS },
460
461
expected : nil ,
461
- createReason : fmt .Sprintf (`couldn't find MachineSet matching MachineDeployment spec template: MachineSet %s: diff: spec.infrastructureRef / old-infra-ref, / new-infra-ref required` , oldMS .Name ),
462
+ createReason : fmt .Sprintf (`couldn't find MachineSet matching MachineDeployment spec template: MachineSet %s: diff: spec.infrastructureRef InfrastructureMachineTemplate old-infra-ref, InfrastructureMachineTemplate new-infra-ref required` , oldMS .Name ),
462
463
},
463
464
{
464
465
Name : "Get the MachineSet if reconciliationTime < rolloutAfter" ,
0 commit comments