diff --git a/test/integration/auth_test.go b/test/integration/auth_test.go index 5b1a3400b75..b28244ec004 100644 --- a/test/integration/auth_test.go +++ b/test/integration/auth_test.go @@ -1312,11 +1312,11 @@ func TestWebhookTokenAuthenticator(t *testing.T) { func() { resp, err := transport.RoundTrip(req) - defer resp.Body.Close() if err != nil { t.Logf("case %v", r) t.Fatalf("unexpected error: %v", err) } + defer resp.Body.Close() // Expect all of Alice's actions to at least get past authn/authz. if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden { t.Logf("case %v", r)