Skip to content

Commit

Permalink
Fix failing unit tests
Browse files Browse the repository at this point in the history
The gomega error matcher can't match on wrapped errors unless the type of the expected object matches the wrapped error type.
  • Loading branch information
julian-hj committed Jun 27, 2023
1 parent fae8e5d commit 26e2191
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/k8s/reconcile_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ var _ = Describe("Reconcile", func() {
})

It("returns the error", func() {
Expect(err).To(MatchError("patch-object-error"))
Expect(err).To(MatchError(errors.New("patch-object-error")))
})
})

Expand All @@ -166,7 +166,7 @@ var _ = Describe("Reconcile", func() {
})

It("returns the error", func() {
Expect(err).To(MatchError("patch-status-error"))
Expect(err).To(MatchError(errors.New("patch-status-error")))
})
})

Expand Down

0 comments on commit 26e2191

Please sign in to comment.