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

refactor: replace pod.Spec.Priority with test.SetPodPriority in plugin tests

This commit is contained in:
Jan Chaloupka
2025-12-21 17:46:29 +01:00
parent 6d7fedc982
commit fc8ae3b4e8
5 changed files with 25 additions and 45 deletions

View File

@@ -115,8 +115,7 @@ func TestHighNodeUtilization(t *testing.T) {
// A Critical Pod.
test.SetNormalOwnerRef(pod)
pod.Namespace = "kube-system"
priority := utils.SystemCriticalPriority
pod.Spec.Priority = &priority
test.SetPodPriority(pod, utils.SystemCriticalPriority)
}),
// These won't be evicted.
test.BuildTestPod("p3", 400, 0, n2NodeName, test.SetDSOwnerRef),
@@ -168,8 +167,7 @@ func TestHighNodeUtilization(t *testing.T) {
// A Critical Pod.
test.SetNormalOwnerRef(pod)
pod.Namespace = "kube-system"
priority := utils.SystemCriticalPriority
pod.Spec.Priority = &priority
test.SetPodPriority(pod, utils.SystemCriticalPriority)
}),
// These won't be evicted.
test.BuildTestPod("p3", 400, 0, n2NodeName, test.SetRSOwnerRef),