From 0c33be962d4ff53ccbbe100bc0f7a12289fd5330 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 14 Dec 2025 12:28:20 +0100 Subject: [PATCH] refactor(TestFindDuplicatePods): have a pod fully created through BuildTestPod without any edits --- .../plugins/removeduplicates/removeduplicates_test.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go index 72251f699..9291bc825 100644 --- a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go +++ b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go @@ -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