Skip to content

Commit

Permalink
Merge pull request #2158 from inteon/test_bugfix
Browse files Browse the repository at this point in the history
馃悰 Don't share error concurrently in test
  • Loading branch information
k8s-ci-robot committed Jan 31, 2023
2 parents f5014c0 + 99069ac commit 81199b9
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 81199b9

Please sign in to comment.