mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
refactor(node_taint_test): inline p15
This commit is contained in:
@@ -163,11 +163,6 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
// node5 has PreferNoSchedule:testTaint1=test1, so the p13 has to have
|
// node5 has PreferNoSchedule:testTaint1=test1, so the p13 has to have
|
||||||
// PreferNoSchedule:testTaint0=test0 so the pod is not tolarated
|
// PreferNoSchedule:testTaint0=test0 so the pod is not tolarated
|
||||||
|
|
||||||
p15 := buildTestPodWithNormalOwnerRef("p15", nodeName7, func(pod *v1.Pod) {
|
|
||||||
withTestTaintToleration1(pod)
|
|
||||||
addTolerationToPod(pod, "testingTaint", "testing", 1, v1.TaintEffectNoSchedule)
|
|
||||||
})
|
|
||||||
|
|
||||||
var uint1, uint2 uint = 1, 2
|
var uint1, uint2 uint = 1, 2
|
||||||
|
|
||||||
tests := []struct {
|
tests := []struct {
|
||||||
@@ -478,7 +473,10 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
description: "Pods not tolerating all taints are evicted when includedTaints is empty",
|
description: "Pods not tolerating all taints are evicted when includedTaints is empty",
|
||||||
pods: []*v1.Pod{
|
pods: []*v1.Pod{
|
||||||
buildTestPodWithNormalOwnerRef("p14", nodeName7, withTestTaintToleration1),
|
buildTestPodWithNormalOwnerRef("p14", nodeName7, withTestTaintToleration1),
|
||||||
p15,
|
buildTestPodWithNormalOwnerRef("p15", nodeName7, func(pod *v1.Pod) {
|
||||||
|
withTestTaintToleration1(pod)
|
||||||
|
addTolerationToPod(pod, "testingTaint", "testing", 1, v1.TaintEffectNoSchedule)
|
||||||
|
}),
|
||||||
},
|
},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
buildTestNode(nodeName7, withBothTaints1),
|
buildTestNode(nodeName7, withBothTaints1),
|
||||||
|
|||||||
Reference in New Issue
Block a user