From d5f4bb56bd07d5a0d865ac0c292b56ed8fd1ff82 Mon Sep 17 00:00:00 2001 From: Joey Kwasniewski Date: Thu, 16 Nov 2023 13:19:55 -0800 Subject: [PATCH] Update pkg/controller/webhook_test.go Co-authored-by: Sanskar Jaiswal Signed-off-by: Joey Kwasniewski --- pkg/controller/webhook_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 {