From 8490ed9c8ff5242114913abd231a1dfc6fdf6f3c Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 14 Dec 2025 13:47:01 +0100 Subject: [PATCH] refactor(TestFindDuplicatePods): inline p6 pod creation --- .../removeduplicates/removeduplicates_test.go | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go index f4c15d138..9422d20af 100644 --- a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go +++ b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go @@ -95,9 +95,6 @@ func TestFindDuplicatePods(t *testing.T) { // A DaemonSet. // A Pod with local storage. // A Mirror Pod. - p6 := buildTestPodForNode1("p6", func(pod *v1.Pod) { - pod.Annotations = test.GetMirrorPodAnnotation() - }) // A Critical Pod. p7 := buildTestPodForNode1("p7", func(pod *v1.Pod) { pod.Namespace = "kube-system" @@ -218,7 +215,10 @@ func TestFindDuplicatePods(t *testing.T) { }, }, } - }), p6, p7, + }), + buildTestPodForNode1("p6", func(pod *v1.Pod) { + pod.Annotations = test.GetMirrorPodAnnotation() + }), p7, }, nodes: []*v1.Node{node1, node2}, expectedEvictedPodCount: 0, @@ -245,7 +245,10 @@ func TestFindDuplicatePods(t *testing.T) { }, }, } - }), p6, p7, p8, p9, p10, + }), + buildTestPodForNode1("p6", func(pod *v1.Pod) { + pod.Annotations = test.GetMirrorPodAnnotation() + }), p7, p8, p9, p10, }, nodes: []*v1.Node{node1, node2}, expectedEvictedPodCount: 2,