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

refactor(TestPodAntiAffinity): ensure nonEvictablePod is created only through apply argument

This commit is contained in:
Jan Chaloupka
2025-12-15 13:24:50 +01:00
parent 0e56823865
commit 3072a59ea0

View File

@@ -119,11 +119,11 @@ func TestPodAntiAffinity(t *testing.T) {
pod.Labels = map[string]string{"foo": "bar"}
})
criticalPriority := utils.SystemCriticalPriority
nonEvictablePod := buildTestPodForNode1("non-evict", func(pod *v1.Pod) {
criticalPriority := utils.SystemCriticalPriority
pod.Spec.Priority = &criticalPriority
pod.Labels = map[string]string{"foo": "bar"}
})
nonEvictablePod.Labels = map[string]string{"foo": "bar"}
var uint1 uint = 1
var uint3 uint = 3