From 2fac727be39a18848706de0d581b056e46e21bf6 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 14 Dec 2025 16:10:09 +0100 Subject: [PATCH] refactor(TestFindDuplicatePods): inline node4 creation --- .../plugins/removeduplicates/removeduplicates_test.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go index 2d5069217..0e23ba2ee 100644 --- a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go +++ b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go @@ -79,11 +79,6 @@ func buildTestPodWithRSOwnerRefWithNamespaceForNode1(name, namespace string, app func TestFindDuplicatePods(t *testing.T) { // first setup pods - node4 := buildTestNode(nodeName4, func(node *v1.Node) { - node.ObjectMeta.Labels = map[string]string{ - "datacenter": "east", - } - }) node5 := buildTestNode(nodeName5, func(node *v1.Node) { node.Spec = v1.NodeSpec{ Unschedulable: true, @@ -343,7 +338,11 @@ func TestFindDuplicatePods(t *testing.T) { }, nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node4, + buildTestNode(nodeName4, func(node *v1.Node) { + node.ObjectMeta.Labels = map[string]string{ + "datacenter": "east", + } + }), }, expectedEvictedPodCount: 0, nodefit: true,