Skip to content

Commit

Permalink
retry reconciliation in delete before finalizer test
Browse files Browse the repository at this point in the history
Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
  • Loading branch information
aryan9600 committed Aug 4, 2023
1 parent cb1a92f commit 213a0d0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions internal/controller/update_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,13 @@ func TestImageUpdateAutomationReconciler_deleteBeforeFinalizer(t *testing.T) {
EventRecorder: record.NewFakeRecorder(32),
}
// NOTE: Only a real API server responds with an error in this scenario.
_, err := r.Reconcile(ctx, ctrl.Request{NamespacedName: client.ObjectKeyFromObject(imageUpdate)})
g.Expect(err).NotTo(HaveOccurred())
g.Eventually(func() bool {
_, err := r.Reconcile(ctx, ctrl.Request{NamespacedName: client.ObjectKeyFromObject(imageUpdate)})
if err != nil {
return false
}
return true
}, timeout).Should(BeTrue())
}

func TestImageAutomationReconciler_commitMessage(t *testing.T) {
Expand Down

0 comments on commit 213a0d0

Please sign in to comment.