From a007fc3bd31433763b576a93dce040d7b19825b3 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Wed, 28 Oct 2020 15:22:53 -0700 Subject: [PATCH] Form paths correctly when the path arg is empty in supervisor_discovery_test.go --- test/integration/supervisor_discovery_test.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/test/integration/supervisor_discovery_test.go b/test/integration/supervisor_discovery_test.go index 4f60a6c1..f4e0397b 100644 --- a/test/integration/supervisor_discovery_test.go +++ b/test/integration/supervisor_discovery_test.go @@ -339,10 +339,16 @@ func temporarilyRemoveAllOIDCProviderConfigsAndDefaultTLSCertSecret(ctx context. } func jwksURLForIssuer(scheme, host, path string) string { + if path == "" { + return fmt.Sprintf("%s://%s/jwks.json", scheme, host) + } return fmt.Sprintf("%s://%s/%s/jwks.json", scheme, host, strings.TrimPrefix(path, "/")) } func wellKnownURLForIssuer(scheme, host, path string) string { + if path == "" { + return fmt.Sprintf("%s://%s/.well-known/openid-configuration", scheme, host) + } return fmt.Sprintf("%s://%s/%s/.well-known/openid-configuration", scheme, host, strings.TrimPrefix(path, "/")) }