Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

e2e dns test autodetect the IP family #93327

Merged
merged 1 commit into from Jul 31, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
44 changes: 4 additions & 40 deletions test/e2e/network/dns_configmap.go
Expand Up @@ -26,7 +26,6 @@ import (
"k8s.io/apimachinery/pkg/util/wait"
"k8s.io/kubernetes/test/e2e/framework"
e2eservice "k8s.io/kubernetes/test/e2e/framework/service"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"

"github.com/onsi/ginkgo"
)
Expand Down Expand Up @@ -484,14 +483,14 @@ func (t *dnsExternalNameTest) run(isIPv6 bool) {
t.restoreDNSConfigMap(originalConfigMapData)
}

var _ = SIGDescribe("DNS configMap nameserver [IPv4]", func() {
var _ = SIGDescribe("DNS configMap nameserver", func() {

ginkgo.Context("Change stubDomain", func() {
nsTest := &dnsNameserverTest{dnsTestCommon: newDNSTestCommon()}

ginkgo.It("should be able to change stubDomain configuration [Slow][Serial]", func() {
nsTest.c = nsTest.f.ClientSet
nsTest.run(false)
nsTest.run(framework.TestContext.ClusterIsIPv6())
})
})

Expand All @@ -500,7 +499,7 @@ var _ = SIGDescribe("DNS configMap nameserver [IPv4]", func() {

ginkgo.It("should forward PTR records lookup to upstream nameserver [Slow][Serial]", func() {
fwdTest.c = fwdTest.f.ClientSet
fwdTest.run(false)
fwdTest.run(framework.TestContext.ClusterIsIPv6())
})
})

Expand All @@ -509,42 +508,7 @@ var _ = SIGDescribe("DNS configMap nameserver [IPv4]", func() {

ginkgo.It("should forward externalname lookup to upstream nameserver [Slow][Serial]", func() {
externalNameTest.c = externalNameTest.f.ClientSet
externalNameTest.run(false)
})
})
})

var _ = SIGDescribe("DNS configMap nameserver [Feature:Networking-IPv6] [LinuxOnly]", func() {

ginkgo.BeforeEach(func() {
// IPv6 is not supported on Windows.
e2eskipper.SkipIfNodeOSDistroIs("windows")
})

ginkgo.Context("Change stubDomain", func() {
nsTest := &dnsNameserverTest{dnsTestCommon: newDNSTestCommon()}

ginkgo.It("should be able to change stubDomain configuration [Slow][Serial]", func() {
nsTest.c = nsTest.f.ClientSet
nsTest.run(true)
})
})

ginkgo.Context("Forward PTR lookup", func() {
fwdTest := &dnsPtrFwdTest{dnsTestCommon: newDNSTestCommon()}

ginkgo.It("should forward PTR records lookup to upstream nameserver [Slow][Serial]", func() {
fwdTest.c = fwdTest.f.ClientSet
fwdTest.run(true)
})
})

ginkgo.Context("Forward external name lookup", func() {
externalNameTest := &dnsExternalNameTest{dnsTestCommon: newDNSTestCommon()}

ginkgo.It("should forward externalname lookup to upstream nameserver [Slow][Serial]", func() {
externalNameTest.c = externalNameTest.f.ClientSet
externalNameTest.run(true)
externalNameTest.run(framework.TestContext.ClusterIsIPv6())
})
})
})