test(utils): explicitly ignore resp.Body.Close() errors in tests

This commit is contained in:
程智超0668000959 committed 2026-06-26 23:03:32 +08:00
1 parent 1260fd8e2f
commit 2cdfadaa8b
2 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -62,7 +62,7 @@ func TestCreateSafeHTTPClient_BlocksPrivateRedirect(t *testing.T) {
allowPrivateHosts = false
resp, err := client.Get(server.URL)
if resp != nil && resp.Body != nil {
resp.Body.Close()
_ = resp.Body.Close()
}
if err == nil {
t.Fatal("expected redirect to private host to fail")