@@ -374,7 +374,8 @@ func TestCloneConfigsAndGenerateMachine(t *testing.T) {
374
374
bootstrapSpec := & bootstrapv1.KubeadmConfigSpec {
375
375
JoinConfiguration : & bootstrapv1.JoinConfiguration {},
376
376
}
377
- g .Expect (r .cloneConfigsAndGenerateMachine (ctx , cluster , kcp , bootstrapSpec , nil )).To (Succeed ())
377
+ _ , err := r .cloneConfigsAndGenerateMachine (ctx , cluster , kcp , bootstrapSpec , nil )
378
+ g .Expect (err ).To (Succeed ())
378
379
379
380
machineList := & clusterv1.MachineList {}
380
381
g .Expect (env .GetAPIReader ().List (ctx , machineList , client .InNamespace (cluster .Namespace ))).To (Succeed ())
@@ -463,7 +464,8 @@ func TestCloneConfigsAndGenerateMachineFail(t *testing.T) {
463
464
464
465
// Try to break Infra Cloning
465
466
kcp .Spec .MachineTemplate .InfrastructureRef .Name = "something_invalid"
466
- g .Expect (r .cloneConfigsAndGenerateMachine (ctx , cluster , kcp , bootstrapSpec , nil )).To (HaveOccurred ())
467
+ _ , err := r .cloneConfigsAndGenerateMachine (ctx , cluster , kcp , bootstrapSpec , nil )
468
+ g .Expect (err ).To (HaveOccurred ())
467
469
g .Expect (& kcp .GetConditions ()[0 ]).Should (conditions .HaveSameStateOf (& clusterv1.Condition {
468
470
Type : controlplanev1 .MachinesCreatedCondition ,
469
471
Status : corev1 .ConditionFalse ,
0 commit comments