Skip to content

Commit

Permalink
Update tests with new cluster domain changes
Browse files Browse the repository at this point in the history
  • Loading branch information
Kauana dos Santos committed May 11, 2023
1 parent 1fce1c3 commit e105306
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions pkg/reconciler/nscert/nscert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,7 @@ func TestUpdateDomainTemplate(t *testing.T) {
fakekubeclient.Get(ctx).CoreV1().Namespaces().Create(ctx, namespace, metav1.CreateOptions{})
fakensinformer.Get(ctx).Informer().GetIndexer().Add(namespace)

want := []string{fmt.Sprintf("*.%s.%s", namespace.Name, routecfg.DefaultDomain)}
want := []string{fmt.Sprintf("*.%s.svc.%s", namespace.Name, routecfg.DefaultDomain)}
cert := <-certEvents
if diff := cmp.Diff(want, cert.Spec.DNSNames); diff != "" {
t.Error("DNSNames (-want, +got) =", diff)
Expand Down Expand Up @@ -375,7 +375,7 @@ func TestUpdateDomainTemplate(t *testing.T) {
watcher.OnChange(netCfg)

// A new domain format not matched by the existing certificate should update the DNSName
want = []string{fmt.Sprintf("*.subdomain.%s.%s", namespace.Name, routecfg.DefaultDomain)}
want = []string{fmt.Sprintf("*.subdomain.%s.svc.%s", namespace.Name, routecfg.DefaultDomain)}
cert = <-certEvents
if diff := cmp.Diff(want, cert.Spec.DNSNames); diff != "" {
t.Error("DNSNames (-want, +got) =", diff)
Expand Down Expand Up @@ -483,8 +483,8 @@ func TestDomainConfigDomain(t *testing.T) {
"autoTLS": "Enabled",
"namespace-wildcard-cert-selector": "{}",
},
wantCertName: "testns.svc.cluster.local",
wantDNSName: "*.testns.svc.cluster.local",
wantCertName: "testns.cluster.local",
wantDNSName: "*.testns.cluster.local",
}, {
name: "default domain",
domainCfg: map[string]string{
Expand Down

0 comments on commit e105306

Please sign in to comment.