From de86809b69d5c8a8613cc82e76c15b8707450815 Mon Sep 17 00:00:00 2001 From: Joshua Casey Date: Thu, 25 Jul 2024 10:05:59 -0500 Subject: [PATCH] Fix some integration tests --- test/integration/concierge_tls_spec_test.go | 4 ++-- test/integration/e2e_test.go | 3 +-- test/integration/supervisor_tls_spec_test.go | 6 +++--- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/test/integration/concierge_tls_spec_test.go b/test/integration/concierge_tls_spec_test.go index 669a3357c..783a17b29 100644 --- a/test/integration/concierge_tls_spec_test.go +++ b/test/integration/concierge_tls_spec_test.go @@ -170,7 +170,7 @@ func TestTLSSpecKubeBuilderValidationConcierge_Parallel(t *testing.T) { performKubectlApply( t, webhookYamlBytes, - `webhookauthenticator.authentication.concierge.pinniped.dev`, + fmt.Sprintf(`webhookauthenticator.authentication.concierge.%s`, env.APIGroupSuffix), tc.expectedErrorSnippets, "WebhookAuthenticator", webhookResourceName, @@ -187,7 +187,7 @@ func TestTLSSpecKubeBuilderValidationConcierge_Parallel(t *testing.T) { performKubectlApply( t, jwtAuthenticatorYamlBytes, - `jwtauthenticator.authentication.concierge.pinniped.dev`, + fmt.Sprintf(`jwtauthenticator.authentication.concierge.%s`, env.APIGroupSuffix), tc.expectedErrorSnippets, "JWTAuthenticator", jwtAuthenticatorResourceName, diff --git a/test/integration/e2e_test.go b/test/integration/e2e_test.go index bf4b14c4d..bd6e7bb08 100644 --- a/test/integration/e2e_test.go +++ b/test/integration/e2e_test.go @@ -1696,11 +1696,10 @@ func TestE2EFullIntegration_Browser(t *testing.T) { expectedDownstreamLDAPGroups := env.SupervisorUpstreamLDAP.TestUserDirectGroupsDNs expectedDownstreamOIDCGroups := env.SupervisorUpstreamOIDC.ExpectedGroups - authenticator := testlib.CreateTestJWTAuthenticator(testCtx, t, defaultJWTAuthenticatorSpec, authenticationv1alpha1.JWTAuthenticatorPhaseError) createdLDAPProvider := setupClusterForEndToEndLDAPTest(t, expectedDownstreamLDAPUsername, env) // Having one IDP should put the FederationDomain into a ready state. testlib.WaitForFederationDomainStatusPhase(testCtx, t, federationDomain.Name, supervisorconfigv1alpha1.FederationDomainPhaseReady) - testlib.WaitForJWTAuthenticatorStatusPhase(testCtx, t, authenticator.Name, authenticationv1alpha1.JWTAuthenticatorPhaseReady) + authenticator := testlib.CreateTestJWTAuthenticator(testCtx, t, defaultJWTAuthenticatorSpec, authenticationv1alpha1.JWTAuthenticatorPhaseReady) // Create a ClusterRoleBinding to give our test user from the upstream read-only access to the cluster. testlib.CreateTestClusterRoleBinding(t, diff --git a/test/integration/supervisor_tls_spec_test.go b/test/integration/supervisor_tls_spec_test.go index 57543638d..af9e441ec 100644 --- a/test/integration/supervisor_tls_spec_test.go +++ b/test/integration/supervisor_tls_spec_test.go @@ -226,7 +226,7 @@ func TestTLSSpecKubeBuilderValidationSupervisor_Parallel(t *testing.T) { performKubectlApply( t, yamlBytes, - `oidcidentityprovider.idp.supervisor.pinniped.dev`, + fmt.Sprintf(`oidcidentityprovider.idp.supervisor.%s`, env.APIGroupSuffix), tc.expectedErrorSnippets, "OIDCIdentityProvider", resourceName, @@ -241,7 +241,7 @@ func TestTLSSpecKubeBuilderValidationSupervisor_Parallel(t *testing.T) { performKubectlApply( t, yamlBytes, - `ldapidentityprovider.idp.supervisor.pinniped.dev`, + fmt.Sprintf(`ldapidentityprovider.idp.supervisor.%s`, env.APIGroupSuffix), tc.expectedErrorSnippets, "LDAPIdentityProvider", resourceName, @@ -256,7 +256,7 @@ func TestTLSSpecKubeBuilderValidationSupervisor_Parallel(t *testing.T) { performKubectlApply( t, yamlBytes, - `activedirectoryidentityprovider.idp.supervisor.pinniped.dev`, + fmt.Sprintf(`activedirectoryidentityprovider.idp.supervisor.%s`, env.APIGroupSuffix), tc.expectedErrorSnippets, "ActiveDirectoryIdentityProvider", resourceName,