From 688b45011a54d1a7049a0b9f4d03f190854afe4c Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Mon, 15 Dec 2025 13:56:07 +0100 Subject: [PATCH] refactor(TestPodAntiAffinity): inline p11 --- .../pod_antiaffinity_test.go | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkg/framework/plugins/removepodsviolatinginterpodantiaffinity/pod_antiaffinity_test.go b/pkg/framework/plugins/removepodsviolatinginterpodantiaffinity/pod_antiaffinity_test.go index c58654d3d..a12dac604 100644 --- a/pkg/framework/plugins/removepodsviolatinginterpodantiaffinity/pod_antiaffinity_test.go +++ b/pkg/framework/plugins/removepodsviolatinginterpodantiaffinity/pod_antiaffinity_test.go @@ -117,11 +117,6 @@ func buildTestPodNonEvictableForNode1() *v1.Pod { func TestPodAntiAffinity(t *testing.T) { - p11 := buildTestPod("p11", nodeName5, func(pod *v1.Pod) { - test.SetNormalOwnerRef(pod) - setLabelsFooBar(pod) - }) - nonEvictablePod := buildTestPodNonEvictableForNode1() var uint1 uint = 1 @@ -316,7 +311,10 @@ func TestPodAntiAffinity(t *testing.T) { description: "Evict pod violating anti-affinity among different node (all pods have anti-affinity)", pods: []*v1.Pod{ buildTestPodP1ForNode1(), - p11}, + buildTestPod("p11", nodeName5, func(pod *v1.Pod) { + test.SetNormalOwnerRef(pod) + setLabelsFooBar(pod) + })}, nodes: []*v1.Node{ buildTestNode1(), test.BuildTestNode(nodeName5, 200, 3000, 10, setNodeMainRegionLabel),