Update a test assertion to make failure easier to understand

This commit is contained in:
Ryan Richard 2023-06-28 10:01:23 -07:00
parent e4f43683d4
commit 022fdb9cfd
2 changed files with 3 additions and 1 deletions

View File

@ -441,7 +441,7 @@ func runSupervisor(ctx context.Context, podInfo *downward.PodInfo, cfg *supervis
dynamicUpstreamIDPProvider := dynamicupstreamprovider.NewDynamicUpstreamIDPProvider() dynamicUpstreamIDPProvider := dynamicupstreamprovider.NewDynamicUpstreamIDPProvider()
secretCache := secret.Cache{} secretCache := secret.Cache{}
// OIDC endpoints will be served by the oidProvidersManager, and any non-OIDC paths will fallback to the healthMux. // OIDC endpoints will be served by the endpoints manager, and any non-OIDC paths will fallback to the healthMux.
oidProvidersManager := endpointsmanager.NewManager( oidProvidersManager := endpointsmanager.NewManager(
healthMux, healthMux,
dynamicJWKSProvider, dynamicJWKSProvider,

View File

@ -2547,6 +2547,8 @@ func makeAuthorizationRequestAndRequireSecurityHeaders(ctx context.Context, t *t
t.Logf("makeAuthorizationRequestAndRequireSecurityHeaders authorization response: %#v", authorizeResp) t.Logf("makeAuthorizationRequestAndRequireSecurityHeaders authorization response: %#v", authorizeResp)
t.Logf("makeAuthorizationRequestAndRequireSecurityHeaders authorization response body: %q", body) t.Logf("makeAuthorizationRequestAndRequireSecurityHeaders authorization response body: %q", body)
} }
require.Less(t, authorizeResp.StatusCode, 400,
"expected a successful authorize response, but got a response status indicating an error (see log above)")
expectSecurityHeaders(t, authorizeResp, false) expectSecurityHeaders(t, authorizeResp, false)
} }