diff --git a/pkg/framework/plugins/removepodsviolatingnodetaints/node_taint_test.go b/pkg/framework/plugins/removepodsviolatingnodetaints/node_taint_test.go index 43023358c..e518100c6 100644 --- a/pkg/framework/plugins/removepodsviolatingnodetaints/node_taint_test.go +++ b/pkg/framework/plugins/removepodsviolatingnodetaints/node_taint_test.go @@ -163,11 +163,6 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) { // node5 has PreferNoSchedule:testTaint1=test1, so the p13 has to have // 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 tests := []struct { @@ -478,7 +473,10 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) { description: "Pods not tolerating all taints are evicted when includedTaints is empty", pods: []*v1.Pod{ buildTestPodWithNormalOwnerRef("p14", nodeName7, withTestTaintToleration1), - p15, + buildTestPodWithNormalOwnerRef("p15", nodeName7, func(pod *v1.Pod) { + withTestTaintToleration1(pod) + addTolerationToPod(pod, "testingTaint", "testing", 1, v1.TaintEffectNoSchedule) + }), }, nodes: []*v1.Node{ buildTestNode(nodeName7, withBothTaints1),