From c1328d96193d57f156462e18100cce890bc0c6b0 Mon Sep 17 00:00:00 2001 From: Ryan Richard Date: Tue, 6 Aug 2024 16:06:36 -0700 Subject: [PATCH] update expectation in supervisor_ldap_idp_test.go --- test/integration/supervisor_ldap_idp_test.go | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/test/integration/supervisor_ldap_idp_test.go b/test/integration/supervisor_ldap_idp_test.go index ad33865bf..bd80cba93 100644 --- a/test/integration/supervisor_ldap_idp_test.go +++ b/test/integration/supervisor_ldap_idp_test.go @@ -37,6 +37,14 @@ func TestLDAPIDPPhaseAndConditions_Parallel(t *testing.T) { }, ) + wantCABundleMessage := func(caBundleConfigured bool) string { + if caBundleConfigured { + return "spec.tls is valid: using configured CA bundle" + } else { + return "spec.tls is valid: no TLS configuration provided: using default root CA bundle from container image" + } + } + happySpec := idpv1alpha1.LDAPIdentityProviderSpec{ Host: env.SupervisorUpstreamLDAP.Host, Bind: idpv1alpha1.LDAPIdentityProviderBind{ @@ -94,7 +102,7 @@ func TestLDAPIDPPhaseAndConditions_Parallel(t *testing.T) { Type: "TLSConfigurationValid", Status: "True", Reason: "Success", - Message: "spec.tls is valid: using configured CA bundle", + Message: wantCABundleMessage(len(happySpec.TLS.CertificateAuthorityData) != 0), }, }, }, @@ -152,7 +160,7 @@ func TestLDAPIDPPhaseAndConditions_Parallel(t *testing.T) { Type: "TLSConfigurationValid", Status: "True", Reason: "Success", - Message: "spec.tls is valid: using configured CA bundle", + Message: wantCABundleMessage(len(happySpec.TLS.CertificateAuthorityData) != 0), }, }, },