From e3299d5f6a4d9bd631b3e154543666e495ac89a5 Mon Sep 17 00:00:00 2001 From: Tobias Wolf Date: Wed, 3 Apr 2019 01:39:31 +0200 Subject: [PATCH] test/e2e/network: Honor --dns-domain in more places Try to finish what commit 4c8a65ac01 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 --- test/e2e/network/dns.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/test/e2e/network/dns.go b/test/e2e/network/dns.go index bb874813e29..d836a36dac5 100644 --- a/test/e2e/network/dns.go +++ b/test/e2e/network/dns.go @@ -84,7 +84,7 @@ var _ = SIGDescribe("DNS", func() { 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} wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, hostEntries, "", "wheezy", 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() { // TODO: Create more endpoints and ensure that multiple A records are returned // for headless service. namesToResolve := []string{ - fmt.Sprintf("%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name), - fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", headlessService.Name, f.Namespace.Name), - fmt.Sprintf("_http._tcp.%s.%s.svc.cluster.local", regularService.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.%s", headlessService.Name, f.Namespace.Name, framework.TestContext.ClusterDNSDomain), + 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)