Update integration tests to use HTTPS Dex for UpstreamOIDCProvider testing.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
This commit is contained in:
Matt Moyer 2020-11-16 18:16:16 -06:00
parent ee978fdde8
commit b31deff0fb
No known key found for this signature in database
GPG Key ID: EAE88AD172C5AE2D
1 changed files with 6 additions and 2 deletions

View File

@ -5,6 +5,7 @@ package integration
import ( import (
"context" "context"
"encoding/base64"
"testing" "testing"
"time" "time"
@ -17,7 +18,7 @@ import (
) )
func TestSupervisorUpstreamOIDCDiscovery(t *testing.T) { func TestSupervisorUpstreamOIDCDiscovery(t *testing.T) {
library.SkipUnlessIntegration(t) env := library.IntegrationEnv(t)
t.Run("invalid missing secret and bad issuer", func(t *testing.T) { t.Run("invalid missing secret and bad issuer", func(t *testing.T) {
t.Parallel() t.Parallel()
@ -50,7 +51,10 @@ func TestSupervisorUpstreamOIDCDiscovery(t *testing.T) {
t.Run("valid", func(t *testing.T) { t.Run("valid", func(t *testing.T) {
t.Parallel() t.Parallel()
spec := v1alpha1.UpstreamOIDCProviderSpec{ spec := v1alpha1.UpstreamOIDCProviderSpec{
Issuer: "https://accounts.google.com", // Use Google as an example of a valid OIDC issuer for now. Issuer: env.OIDCUpstream.Issuer,
TLS: &v1alpha1.TLSSpec{
CertificateAuthorityData: base64.StdEncoding.EncodeToString([]byte(env.OIDCUpstream.CABundle)),
},
AuthorizationConfig: v1alpha1.OIDCAuthorizationConfig{ AuthorizationConfig: v1alpha1.OIDCAuthorizationConfig{
AdditionalScopes: []string{"email", "profile"}, AdditionalScopes: []string{"email", "profile"},
}, },