mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 05:14:13 +01:00
refactor(TestFindDuplicatePods): have a pod fully created through BuildTestPod without any edits
This commit is contained in:
@@ -100,7 +100,10 @@ func TestFindDuplicatePods(t *testing.T) {
|
||||
},
|
||||
}
|
||||
})
|
||||
p6 := test.BuildTestPod("p6", 100, 0, node1.Name, nil)
|
||||
// A Mirror Pod.
|
||||
p6 := test.BuildTestPod("p6", 100, 0, node1.Name, func(pod *v1.Pod) {
|
||||
pod.Annotations = test.GetMirrorPodAnnotation()
|
||||
})
|
||||
p7 := test.BuildTestPod("p7", 100, 0, node1.Name, nil)
|
||||
p7.Namespace = "kube-system"
|
||||
p8 := test.BuildTestPod("p8", 100, 0, node1.Name, nil)
|
||||
@@ -144,9 +147,6 @@ func TestFindDuplicatePods(t *testing.T) {
|
||||
|
||||
// ### Non-evictable Pods ###
|
||||
|
||||
// A Mirror Pod.
|
||||
p6.Annotations = test.GetMirrorPodAnnotation()
|
||||
|
||||
// A Critical Pod.
|
||||
priority := utils.SystemCriticalPriority
|
||||
p7.Spec.Priority = &priority
|
||||
|
||||
Reference in New Issue
Block a user