mirror of
https://github.com/vmware-tanzu/pinniped.git
synced 2026-08-15 11:46:12 +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:
co-authored by
Joshua Casey
Ashish Amarnath
parent
60f82d2a55
commit
ca2dd2d476
+3
-3
@@ -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