mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
refactor(TestRemovePodsHavingTooManyRestarts): inline node5
This commit is contained in:
@@ -130,8 +130,6 @@ func initPods(apply func(pod *v1.Pod)) []*v1.Pod {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
|
func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
|
||||||
node5 := buildTestNode(nodeName5, nil)
|
|
||||||
|
|
||||||
createRemovePodsHavingTooManyRestartsAgrs := func(
|
createRemovePodsHavingTooManyRestartsAgrs := func(
|
||||||
podRestartThresholds int32,
|
podRestartThresholds int32,
|
||||||
includingInitContainers bool,
|
includingInitContainers bool,
|
||||||
@@ -301,7 +299,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
|
|||||||
pods: initPods(nil),
|
pods: initPods(nil),
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
buildTestNode(nodeName1, nil),
|
buildTestNode(nodeName1, nil),
|
||||||
node5,
|
buildTestNode(nodeName5, nil),
|
||||||
},
|
},
|
||||||
expectedEvictedPodCount: 3,
|
expectedEvictedPodCount: 3,
|
||||||
maxPodsToEvictPerNode: &uint3,
|
maxPodsToEvictPerNode: &uint3,
|
||||||
@@ -319,7 +317,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
|
|||||||
}),
|
}),
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
buildTestNode(nodeName1, nil),
|
buildTestNode(nodeName1, nil),
|
||||||
node5,
|
buildTestNode(nodeName5, nil),
|
||||||
},
|
},
|
||||||
expectedEvictedPodCount: 3,
|
expectedEvictedPodCount: 3,
|
||||||
maxPodsToEvictPerNode: &uint3,
|
maxPodsToEvictPerNode: &uint3,
|
||||||
@@ -331,7 +329,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
|
|||||||
pods: initPods(nil),
|
pods: initPods(nil),
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
buildTestNode(nodeName1, nil),
|
buildTestNode(nodeName1, nil),
|
||||||
node5,
|
buildTestNode(nodeName5, nil),
|
||||||
},
|
},
|
||||||
expectedEvictedPodCount: 0,
|
expectedEvictedPodCount: 0,
|
||||||
maxPodsToEvictPerNode: &uint3,
|
maxPodsToEvictPerNode: &uint3,
|
||||||
|
|||||||
Reference in New Issue
Block a user