mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 03:41:45 +00:00
Merge pull request #101211 from aojea/nosnat
e2e create pods only on schedulable nodes
This commit is contained in:
commit
9f5573e83f
@ -28,6 +28,7 @@ import (
|
|||||||
"k8s.io/apimachinery/pkg/util/wait"
|
"k8s.io/apimachinery/pkg/util/wait"
|
||||||
|
|
||||||
"k8s.io/kubernetes/test/e2e/framework"
|
"k8s.io/kubernetes/test/e2e/framework"
|
||||||
|
e2enode "k8s.io/kubernetes/test/e2e/framework/node"
|
||||||
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
e2epod "k8s.io/kubernetes/test/e2e/framework/pod"
|
||||||
"k8s.io/kubernetes/test/e2e/network/common"
|
"k8s.io/kubernetes/test/e2e/network/common"
|
||||||
imageutils "k8s.io/kubernetes/test/utils/image"
|
imageutils "k8s.io/kubernetes/test/utils/image"
|
||||||
@ -65,10 +66,9 @@ var _ = common.SIGDescribe("NoSNAT [Feature:NoSNAT] [Slow]", func() {
|
|||||||
ginkgo.It("Should be able to send traffic between Pods without SNAT", func() {
|
ginkgo.It("Should be able to send traffic between Pods without SNAT", func() {
|
||||||
cs := f.ClientSet
|
cs := f.ClientSet
|
||||||
pc := cs.CoreV1().Pods(f.Namespace.Name)
|
pc := cs.CoreV1().Pods(f.Namespace.Name)
|
||||||
nc := cs.CoreV1().Nodes()
|
|
||||||
|
|
||||||
ginkgo.By("creating a test pod on each Node")
|
ginkgo.By("creating a test pod on each Node")
|
||||||
nodes, err := nc.List(context.TODO(), metav1.ListOptions{})
|
nodes, err := e2enode.GetReadySchedulableNodes(cs)
|
||||||
framework.ExpectNoError(err)
|
framework.ExpectNoError(err)
|
||||||
framework.ExpectNotEqual(len(nodes.Items), 0, "no Nodes in the cluster")
|
framework.ExpectNotEqual(len(nodes.Items), 0, "no Nodes in the cluster")
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user