From 22649a19d01a2eecfd0ab846fac5bb6a037bbb0e Mon Sep 17 00:00:00 2001 From: Jordan Liggitt Date: Sat, 21 May 2016 16:48:00 -0400 Subject: [PATCH] Fix panic in auth test failure --- test/integration/auth_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/integration/auth_test.go b/test/integration/auth_test.go index 7b7c441eb85..cbf1b333680 100644 --- a/test/integration/auth_test.go +++ b/test/integration/auth_test.go @@ -1311,11 +1311,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)