Update TestSupervisorOIDCDiscovery for versioned IDP discovery endpoint

This commit is contained in:
Ryan Richard 2021-05-13 13:07:31 -07:00
parent f15fc66e06
commit 609883c49e

View File

@ -482,11 +482,11 @@ func requireWellKnownEndpointIsWorking(t *testing.T, supervisorScheme, superviso
"scopes_supported": ["openid", "offline"], "scopes_supported": ["openid", "offline"],
"response_types_supported": ["code"], "response_types_supported": ["code"],
"claims_supported": ["groups"], "claims_supported": ["groups"],
"discovery.supervisor.pinniped.dev/v1alpha1": {"pinniped_identity_providers_endpoint": "%s/v1alpha1/pinniped_identity_providers"},
"subject_types_supported": ["public"], "subject_types_supported": ["public"],
"id_token_signing_alg_values_supported": ["ES256"], "id_token_signing_alg_values_supported": ["ES256"]
"pinniped_idps": []
}`) }`)
expectedJSON := fmt.Sprintf(expectedResultTemplate, issuerName, issuerName, issuerName, issuerName) expectedJSON := fmt.Sprintf(expectedResultTemplate, issuerName, issuerName, issuerName, issuerName, issuerName)
require.Equal(t, "application/json", response.Header.Get("content-type")) require.Equal(t, "application/json", response.Header.Get("content-type"))
require.JSONEq(t, expectedJSON, responseBody) require.JSONEq(t, expectedJSON, responseBody)