From 2ab6704e5926db30fa453b9332f4b54c82f74dff Mon Sep 17 00:00:00 2001 From: ItsT0ng Date: Sun, 1 Mar 2026 16:53:44 +1100 Subject: [PATCH] fix(utils): close resp in test to satisfy bodyclose linter --- pkg/utils/http_retry_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/utils/http_retry_test.go b/pkg/utils/http_retry_test.go index eed654e37..c53423cc0 100644 --- a/pkg/utils/http_retry_test.go +++ b/pkg/utils/http_retry_test.go @@ -107,6 +107,9 @@ func TestDoRequestWithRetry_ContextCancel(t *testing.T) { require.NoError(t, err) resp, err := DoRequestWithRetry(client, req) + if resp != nil { + resp.Body.Close() + } require.Error(t, err, "expected error from context cancellation") assert.Nil(t, resp, "expected nil response when context is canceled") assert.True(t, bodyClosed, "expected resp.Body to be closed on context cancellation")