mirror of
				https://github.com/optim-enterprises-bv/kubernetes.git
				synced 2025-11-04 12:18:16 +00:00 
			
		
		
		
	Merge pull request #26025 from liggitt/auth-test-flake
Automatic merge from submit-queue Fix panic in auth test failure I got a spurious failure in the webhook integration test, but couldn't see the error returned because a panic was hit that assumed a body was always returned with the response
This commit is contained in:
		@@ -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)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user