diff --git a/pkg/controller/webhook_test.go b/pkg/controller/webhook_test.go index d651da006..50e19bcc7 100644 --- a/pkg/controller/webhook_test.go +++ b/pkg/controller/webhook_test.go @@ -268,7 +268,7 @@ func TestCallWebhook_Retries(t *testing.T) { retries := 1 failures := 0 ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { - if failures <= retries-1 { + if failures < retries { w.WriteHeader(http.StatusInternalServerError) failures++ } else {