Be sure to update the DEFAULT cert instead of the per-FederationDomain cert when the supervisor is using an IP address

This commit is contained in:
Joshua Casey
2024-09-01 14:02:46 -05:00
parent dc72a36cb1
commit ca9503e4c0
6 changed files with 171 additions and 131 deletions

View File

@@ -367,6 +367,11 @@ func CreateTestFederationDomain(
createContext, cancel := context.WithTimeout(ctx, time.Minute)
defer cancel()
// If the issuer is an IP address, then we have to update the DEFAULT cert, and there's no secret associated with this FederationDomain
if NewSupervisorIssuer(t, spec.Issuer).IsIPAddress() {
spec.TLS = nil
}
federationDomainsClient := NewSupervisorClientset(t).ConfigV1alpha1().FederationDomains(testEnv.SupervisorNamespace)
federationDomain, err := federationDomainsClient.Create(createContext, &supervisorconfigv1alpha1.FederationDomain{
ObjectMeta: TestObjectMeta(t, "oidc-provider"),