mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-02 17:57:33 +00:00
Skip PodTopologySpread tests in a single node cluster scenario
This commit is contained in:
@@ -718,6 +718,9 @@ var _ = SIGDescribe("SchedulerPredicates [Serial]", func() {
|
||||
topologyKey := "kubernetes.io/e2e-pts-filter"
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
if len(nodeList.Items) < 2 {
|
||||
ginkgo.Skip("At least 2 nodes are required to run the test")
|
||||
}
|
||||
ginkgo.By("Trying to get 2 available nodes which can run pod")
|
||||
nodeNames = Get2NodesThatCanRunPod(f)
|
||||
ginkgo.By(fmt.Sprintf("Apply dedicated topologyKey %v for this test on the 2 nodes.", topologyKey))
|
||||
|
@@ -306,6 +306,9 @@ var _ = SIGDescribe("SchedulerPreemption [Serial]", func() {
|
||||
var fakeRes v1.ResourceName = "example.com/fakePTSRes"
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
if len(nodeList.Items) < 2 {
|
||||
ginkgo.Skip("At least 2 nodes are required to run the test")
|
||||
}
|
||||
ginkgo.By("Trying to get 2 available nodes which can run pod")
|
||||
nodeNames = Get2NodesThatCanRunPod(f)
|
||||
ginkgo.By(fmt.Sprintf("Apply dedicated topologyKey %v for this test on the 2 nodes.", topologyKey))
|
||||
|
@@ -387,6 +387,9 @@ var _ = SIGDescribe("SchedulerPriorities [Serial]", func() {
|
||||
topologyKey := "kubernetes.io/e2e-pts-score"
|
||||
|
||||
ginkgo.BeforeEach(func() {
|
||||
if len(nodeList.Items) < 2 {
|
||||
ginkgo.Skip("At least 2 nodes are required to run the test")
|
||||
}
|
||||
ginkgo.By("Trying to get 2 available nodes which can run pod")
|
||||
nodeNames = Get2NodesThatCanRunPod(f)
|
||||
ginkgo.By(fmt.Sprintf("Apply dedicated topologyKey %v for this test on the 2 nodes.", topologyKey))
|
||||
|
Reference in New Issue
Block a user