Skip to content

Commit e3299d5

Browse files
committed
test/e2e/network: Honor --dns-domain in more places
Try to finish what commit 4c8a65a started; that is, do not assume cluster.local is a constant base domain, when it is configurable. This makes DNS e2e tests pass with --dns-domain, which was only being honored for some tests, not all Signed-off-by: Tobias Wolf <[email protected]>
1 parent 4e397d9 commit e3299d5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

test/e2e/network/dns.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var _ = SIGDescribe("DNS", func() {
8484
namesToResolve = append(namesToResolve, "metadata")
8585
}
8686
}
87-
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.cluster.local", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name)
87+
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
8888
hostEntries := []string{hostFQDN, dnsTestPodHostName}
8989
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
9090
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
@@ -152,9 +152,9 @@ var _ = SIGDescribe("DNS", func() {
152152
// TODO: Create more endpoints and ensure that multiple A records are returned
153153
// for headless service.
154154
namesToResolve := []string{
155-
fmt.Sprintf("%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name),
156-
fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name),
157-
fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", regularService.Name, f.Namespace.Name),
155+
fmt.Sprintf("%s.%s.svc.%s", headlessService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
156+
fmt.Sprintf("_http._tcp.%s.%s.svc.%s", headlessService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
157+
fmt.Sprintf("_http._tcp.%s.%s.svc.%s", regularService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
158158
}
159159

160160
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)

0 commit comments

Comments
 (0)