Skip to content

Commit

Permalink
don't share error concurrently
Browse files Browse the repository at this point in the history
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
  • Loading branch information
inteon committed Jan 31, 2023
1 parent f5014c0 commit 99069ac
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/webhook/webhook_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ var _ = Describe("Webhook", func() {

ctx, cancel := context.WithCancel(context.Background())
go func() {
err = server.Start(ctx)
err := server.Start(ctx)
Expect(err).NotTo(HaveOccurred())
}()

Eventually(func() bool {
err = c.Create(context.TODO(), obj)
err := c.Create(context.TODO(), obj)
return err != nil && strings.HasSuffix(err.Error(), "Always denied") && apierrors.ReasonForError(err) == metav1.StatusReasonForbidden
}, 1*time.Second).Should(BeTrue())

Expand Down

0 comments on commit 99069ac

Please sign in to comment.