Commit 22649a19 authored by Jordan Liggitt's avatar Jordan Liggitt

Fix panic in auth test failure

parent 4a78db61
...@@ -1311,11 +1311,11 @@ func TestWebhookTokenAuthenticator(t *testing.T) { ...@@ -1311,11 +1311,11 @@ func TestWebhookTokenAuthenticator(t *testing.T) {
func() { func() {
resp, err := transport.RoundTrip(req) resp, err := transport.RoundTrip(req)
defer resp.Body.Close()
if err != nil { if err != nil {
t.Logf("case %v", r) t.Logf("case %v", r)
t.Fatalf("unexpected error: %v", err) t.Fatalf("unexpected error: %v", err)
} }
defer resp.Body.Close()
// Expect all of Alice's actions to at least get past authn/authz. // Expect all of Alice's actions to at least get past authn/authz.
if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden { if resp.StatusCode == http.StatusUnauthorized || resp.StatusCode == http.StatusForbidden {
t.Logf("case %v", r) t.Logf("case %v", r)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment