Skip PodTopologySpread tests in a single node cluster scenario

This commit is contained in:
Jan Chaloupka
2021-03-11 12:32:09 +01:00
parent 23d4b3b4f0
commit 34c2672115
3 changed files with 9 additions and 0 deletions

View File

@@ -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))

View File

@@ -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))

View File

@@ -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))