1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

refactor: add SetMirrorPodAnnotation helper function

This commit is contained in:
Jan Chaloupka
2025-12-15 17:41:25 +01:00
parent 78ff3fe92a
commit ca0f7535fb
2 changed files with 6 additions and 3 deletions

View File

@@ -156,9 +156,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
},
}
})
p10 := buildTestPodWithNormalOwnerRef("p10", nodeName2, func(pod *v1.Pod) {
pod.Annotations = test.GetMirrorPodAnnotation()
})
p10 := buildTestPodWithNormalOwnerRef("p10", nodeName2, test.SetMirrorPodAnnotation)
p11 := buildTestPodWithNormalOwnerRef("p11", nodeName2, nil)
p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
pod.Spec.NodeSelector = map[string]string{