diff --git a/test/conformance/testdata/conformance.txt b/test/conformance/testdata/conformance.txt index ddbec39ed0c..1881ea19a31 100755 --- a/test/conformance/testdata/conformance.txt +++ b/test/conformance/testdata/conformance.txt @@ -179,6 +179,7 @@ test/e2e/kubectl/kubectl.go: "should create a job from an image, then delete the test/e2e/kubectl/kubectl.go: "should support proxy with --port 0" test/e2e/kubectl/kubectl.go: "should support --unix-socket=/path" test/e2e/network/dns.go: "should provide DNS for the cluster" +test/e2e/network/dns.go: "should provide /etc/hosts entries for the cluster" test/e2e/network/dns.go: "should provide DNS for services" test/e2e/network/proxy.go: "should proxy logs on node with explicit kubelet port using proxy subresource" test/e2e/network/proxy.go: "should proxy logs on node using proxy subresource" diff --git a/test/e2e/network/dns.go b/test/e2e/network/dns.go index 0acd30efed2..a035afaa7a1 100644 --- a/test/e2e/network/dns.go +++ b/test/e2e/network/dns.go @@ -39,7 +39,7 @@ var _ = SIGDescribe("DNS", func() { /* Release : v1.9 Testname: DNS, cluster - Description: When a Pod is created, the pod MUST be able to resolve cluster dns entries such as kubernetes.default via DNS and /etc/hosts. + Description: When a Pod is created, the pod MUST be able to resolve cluster dns entries such as kubernetes.default via DNS. */ framework.ConformanceIt("should provide DNS for the cluster ", func() { // All the names we need to be able to resolve. @@ -53,10 +53,8 @@ var _ = SIGDescribe("DNS", func() { namesToResolve = append(namesToResolve, "google.com") namesToResolve = append(namesToResolve, "metadata") } - 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) + wheezyProbeCmd, wheezyFileNames := createProbeCommand(namesToResolve, nil, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) + jessieProbeCmd, jessieFileNames := createProbeCommand(namesToResolve, nil, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) By("Running these commands on wheezy: " + wheezyProbeCmd + "\n") By("Running these commands on jessie: " + jessieProbeCmd + "\n") @@ -91,6 +89,25 @@ var _ = SIGDescribe("DNS", func() { validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...)) }) + /* + Release : v1.14 + Testname: DNS, cluster + Description: When a Pod is created, the pod MUST be able to resolve cluster dns entries such as kubernetes.default via /etc/hosts. + */ + framework.ConformanceIt("should provide /etc/hosts entries for the cluster [LinuxOnly]", func() { + hostFQDN := fmt.Sprintf("%s.%s.%s.svc.%s", dnsTestPodHostName, dnsTestServiceName, f.Namespace.Name, framework.TestContext.ClusterDNSDomain) + hostEntries := []string{hostFQDN, dnsTestPodHostName} + wheezyProbeCmd, wheezyFileNames := createProbeCommand(nil, hostEntries, "", "wheezy", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) + jessieProbeCmd, jessieFileNames := createProbeCommand(nil, hostEntries, "", "jessie", f.Namespace.Name, framework.TestContext.ClusterDNSDomain) + By("Running these commands on wheezy: " + wheezyProbeCmd + "\n") + By("Running these commands on jessie: " + jessieProbeCmd + "\n") + + // Run a pod which probes /etc/hosts and exposes the results by HTTP. + By("creating a pod to probe /etc/hosts") + pod := createDNSPod(f.Namespace.Name, wheezyProbeCmd, jessieProbeCmd, dnsTestPodHostName, dnsTestServiceName) + validateDNSResults(f, pod, append(wheezyFileNames, jessieFileNames...)) + }) + /* Release : v1.9 Testname: DNS, services