Skip to content

Commit 1f715ad

Browse files
committed
Fix test cases
1 parent 62b7448 commit 1f715ad

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

exp/internal/controllers/machinepool_controller_phases.go

+1
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ func (r *MachinePoolReconciler) reconcileBootstrap(ctx context.Context, cluster
217217

218218
if !ready {
219219
log.V(2).Info("Bootstrap provider is not ready, requeuing")
220+
m.Status.BootstrapReady = ready
220221
return ctrl.Result{RequeueAfter: externalReadyWait}, nil
221222
}
222223

exp/internal/controllers/machinepool_controller_phases_test.go

+5-4
Original file line numberDiff line numberDiff line change
@@ -688,7 +688,7 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) {
688688
},
689689
},
690690
{
691-
name: "existing machinepool, bootstrap provider is to not ready",
691+
name: "existing machinepool, bootstrap provider is not ready",
692692
bootstrapConfig: map[string]interface{}{
693693
"kind": builder.TestBootstrapConfigKind,
694694
"apiVersion": builder.BootstrapGroupVersion.String(),
@@ -722,12 +722,13 @@ func TestReconcileMachinePoolBootstrap(t *testing.T) {
722722
},
723723
},
724724
Status: expv1.MachinePoolStatus{
725-
BootstrapReady: true,
725+
BootstrapReady: false,
726726
},
727727
},
728-
expectError: false,
728+
expectError: false,
729+
expectResult: ctrl.Result{RequeueAfter: externalReadyWait},
729730
expected: func(g *WithT, m *expv1.MachinePool) {
730-
g.Expect(m.Status.BootstrapReady).To(BeTrue())
731+
g.Expect(m.Status.BootstrapReady).To(BeFalse())
731732
},
732733
},
733734
}

0 commit comments

Comments
 (0)