소스 검색

fix lint warning

Signed-off-by: Nicola Murino <[email protected]>
Nicola Murino 1 년 전
부모
커밋
321c3f00d2
1개의 변경된 파일4개의 추가작업 그리고 2개의 파일을 삭제
  1. 4 2
      internal/common/protocol_test.go

+ 4 - 2
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) {