Skip to content

Commit

Permalink
fix race on delete in integration default_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
gabemontero committed Aug 26, 2021
1 parent 4dfd2a3 commit d750759
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion controllers/default_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ var _ = g.Describe("Reconcile default ShipwrightBuild installation", func() {
o.Expect(err).NotTo(o.HaveOccurred())

err = k8sClient.Delete(ctx, build, &client.DeleteOptions{})
o.Expect(err).NotTo(o.HaveOccurred())
// the delete e2e's can delete this object before this AfterEach runs
o.Expect(err).To(o.BeNil(), o.MatchError(metav1.StatusReasonNotFound))

g.By("waiting for ShipwrightBuild instance to be completely removed")
test.EventuallyRemoved(ctx, k8sClient, build)
Expand Down

0 comments on commit d750759

Please sign in to comment.