Commit e3299d5f authored by Tobias Wolf's avatar Tobias Wolf

test/e2e/network: Honor --dns-domain in more places

Try to finish what commit 4c8a65ac 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: 's avatarTobias Wolf <towolf@gmail.com>
parent 4e397d97
...@@ -84,7 +84,7 @@ var _ = SIGDescribe("DNS", func() { ...@@ -84,7 +84,7 @@ var _ = SIGDescribe("DNS", func() {
namesToResolve = append(namesToResolve, "metadata") namesToResolve = append(namesToResolve, "metadata")
} }
} }
hostFQDN := fmt.Sprintf("%s.%s.%s.svc.cluster.local", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name) hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
hostEntries := []string{hostFQDN, dnsTestPodHostName} hostEntries := []string{hostFQDN, dnsTestPodHostName}
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
...@@ -152,9 +152,9 @@ var _ = SIGDescribe("DNS", func() { ...@@ -152,9 +152,9 @@ var _ = SIGDescribe("DNS", func() {
// TODO: Create more endpoints and ensure that multiple A records are returned // TODO: Create more endpoints and ensure that multiple A records are returned
// for headless service. // for headless service.
namesToResolve := []string{ namesToResolve := []string{
fmt.Sprintf("%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name), fmt.Sprintf("%s.%s.svc.%s", headlessService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name), fmt.Sprintf("_http._tcp.%s.%s.svc.%s", headlessService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", regularService.Name, f.Namespace.Name), fmt.Sprintf("_http._tcp.%s.%s.svc.%s", regularService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain),
} }
wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, regularService.Spec.ClusterIP, "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment