mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 13:29:11 +01:00
refactor(node_taint_test): apply pod single creation convention for p12
This commit is contained in:
@@ -174,8 +174,12 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
||||
p11 := buildTestPod("p11", nodeName2, func(pod *v1.Pod) {
|
||||
pod.ObjectMeta.OwnerReferences = test.GetNormalPodOwnerRefList()
|
||||
})
|
||||
p12 := buildTestPod("p11", nodeName2, nil)
|
||||
p12.ObjectMeta.OwnerReferences = test.GetNormalPodOwnerRefList()
|
||||
p12 := buildTestPod("p11", nodeName2, func(pod *v1.Pod) {
|
||||
pod.ObjectMeta.OwnerReferences = test.GetNormalPodOwnerRefList()
|
||||
pod.Spec.NodeSelector = map[string]string{
|
||||
"datacenter": "west",
|
||||
}
|
||||
})
|
||||
|
||||
// The following 4 pods won't get evicted.
|
||||
// A Critical Pod.
|
||||
@@ -183,10 +187,6 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
||||
// A pod with local storage.
|
||||
// A Mirror Pod.
|
||||
|
||||
p12.Spec.NodeSelector = map[string]string{
|
||||
"datacenter": "west",
|
||||
}
|
||||
|
||||
p13 := buildTestPod("p13", nodeName5, nil)
|
||||
p13.ObjectMeta.OwnerReferences = test.GetNormalPodOwnerRefList()
|
||||
// node5 has PreferNoSchedule:testTaint1=test1, so the p13 has to have
|
||||
|
||||
Reference in New Issue
Block a user