Skip to content

Commit

Permalink
Add eventually to MP reconcile test
Browse files Browse the repository at this point in the history
Signed-off-by: killianmuldoon <kmuldoon@vmware.com>
  • Loading branch information
killianmuldoon committed Jun 27, 2023
1 parent 632fda1 commit 5ee0bf4
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1249,13 +1249,14 @@ func TestReconcileMachinePoolScaleToFromZero(t *testing.T) {
g.Expect(res.Requeue).To(BeFalse())

r.reconcilePhase(machinepool)

g.Expect(machinepool.Status.GetTypedPhase()).To(Equal(expv1.MachinePoolPhaseRunning))

delNode := &corev1.Node{}
err = env.GetAPIReader().Get(ctx, client.ObjectKeyFromObject(node), delNode)
g.Expect(err).ToNot(BeNil())
g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
g.Eventually(func(g Gomega) {
err = fakeClient.Get(ctx, client.ObjectKeyFromObject(node), delNode)
g.Expect(err).ToNot(BeNil())
g.Expect(apierrors.IsNotFound(err)).To(BeTrue())
}).Should(Succeed())
})

t.Run("Should set `Running` when scaled to zero", func(t *testing.T) {
Expand Down

0 comments on commit 5ee0bf4

Please sign in to comment.