Merge pull request #107132 from NikhilSharmaWe/netTest

made independent test cases ginkgo.It for checking connectivity
This commit is contained in:
Kubernetes Prow Robot 2022-03-11 13:26:22 -08:00 committed by GitHub
commit 633313616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,6 +24,7 @@ import (
"k8s.io/apimachinery/pkg/util/uuid"
"k8s.io/kubernetes/test/e2e/framework"
e2eskipper "k8s.io/kubernetes/test/e2e/framework/skipper"
imageutils "k8s.io/kubernetes/test/utils/image"
"github.com/onsi/ginkgo"
@ -61,14 +62,6 @@ var _ = SIGDescribe("Hybrid cluster network", func() {
ginkgo.By("creating a windows pod and waiting for it to be running")
windowsPod = f.PodClient().CreateSync(windowsPod)
ginkgo.By("verifying pod external connectivity to the internet")
ginkgo.By("checking connectivity to 8.8.8.8 53 (google.com) from Linux")
assertConsistentConnectivity(f, linuxPod.ObjectMeta.Name, linuxOS, linuxCheck("8.8.8.8", 53))
ginkgo.By("checking connectivity to www.google.com from Windows")
assertConsistentConnectivity(f, windowsPod.ObjectMeta.Name, windowsOS, windowsCheck("www.google.com"))
ginkgo.By("verifying pod internal connectivity to the cluster dataplane")
ginkgo.By("checking connectivity from Linux to Windows")
@ -79,6 +72,28 @@ var _ = SIGDescribe("Hybrid cluster network", func() {
})
ginkgo.It("should provide Internet connection for Linux containers using DNS [Feature:Networking-DNS]", func() {
linuxPod := createTestPod(f, linuxBusyBoxImage, linuxOS)
ginkgo.By("creating a linux pod and waiting for it to be running")
linuxPod = f.PodClient().CreateSync(linuxPod)
ginkgo.By("verifying pod external connectivity to the internet")
ginkgo.By("checking connectivity to 8.8.8.8 53 (google.com) from Linux")
assertConsistentConnectivity(f, linuxPod.ObjectMeta.Name, linuxOS, linuxCheck("8.8.8.8", 53))
})
ginkgo.It("should provide Internet connection for Windows containers using DNS [Feature:Networking-DNS]", func() {
windowsPod := createTestPod(f, windowsBusyBoximage, windowsOS)
ginkgo.By("creating a windows pod and waiting for it to be running")
windowsPod = f.PodClient().CreateSync(windowsPod)
ginkgo.By("verifying pod external connectivity to the internet")
ginkgo.By("checking connectivity to 8.8.8.8 53 (google.com) from Windows")
assertConsistentConnectivity(f, windowsPod.ObjectMeta.Name, windowsOS, windowsCheck("www.google.com"))
})
})
})