mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-30 15:05:27 +00:00
Merge pull request #72729 from bclau/tests/split-dns-host-entries
tests: Separates DNS hosts entries test
This commit is contained in:
commit
a99d6cef86
1
test/conformance/testdata/conformance.txt
vendored
1
test/conformance/testdata/conformance.txt
vendored
@ -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"
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user