From 321c3f00d2bcc9e4cb00fbd19a582fb018117f90 Mon Sep 17 00:00:00 2001 From: Nicola Murino Date: Sun, 11 Aug 2024 09:26:07 +0200 Subject: [PATCH] fix lint warning Signed-off-by: Nicola Murino --- internal/common/protocol_test.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/internal/common/protocol_test.go b/internal/common/protocol_test.go index 0966521b..9418672e 100644 --- a/internal/common/protocol_test.go +++ b/internal/common/protocol_test.go @@ -9062,8 +9062,10 @@ func TestHTTPFs(t *testing.T) { } func TestProxyProtocol(t *testing.T) { - _, err := httpclient.Get(fmt.Sprintf("http://%v", httpProxyAddr)) - assert.Error(t, err) + resp, err := httpclient.Get(fmt.Sprintf("http://%v", httpProxyAddr)) + if !assert.Error(t, err) { + resp.Body.Close() + } } func TestSetProtocol(t *testing.T) {