mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-01-04 20:24:26 +00:00
refactor InferSupervisorIssuerURL() func; remove a TODO
Co-authored-by: Joshua Casey <joshuatcasey@gmail.com> Co-authored-by: Ashish Amarnath <ashish.amarnath@broadcom.com>
This commit is contained in:
@@ -84,10 +84,10 @@ type TestOIDCUpstream struct {
|
||||
ExpectedGroups []string `json:"expectedGroups"`
|
||||
}
|
||||
|
||||
// InferTheIssuerURL infers the downstream issuer URL from the callback associated with the upstream test client registration.
|
||||
func (upstream *TestOIDCUpstream) InferTheIssuerURL(t *testing.T) (*url.URL, string) {
|
||||
// InferSupervisorIssuerURL infers the downstream issuer URL from the callback associated with the upstream test client registration.
|
||||
func (e *TestEnv) InferSupervisorIssuerURL(t *testing.T) (*url.URL, string) {
|
||||
t.Helper()
|
||||
issuerURL, err := url.Parse(upstream.CallbackURL)
|
||||
issuerURL, err := url.Parse(e.SupervisorUpstreamOIDC.CallbackURL)
|
||||
require.NoError(t, err)
|
||||
require.True(t, strings.HasSuffix(issuerURL.Path, "/callback"))
|
||||
issuerURL.Path = strings.TrimSuffix(issuerURL.Path, "/callback")
|
||||
|
||||
Reference in New Issue
Block a user