From babc4137a4ce4ba8c548ff1b5df566703e983ace Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 14 Dec 2025 16:09:49 +0100 Subject: [PATCH] refactor(TestFindDuplicatePods): inline node3 creation --- .../removeduplicates/removeduplicates_test.go | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go index 88239f735..2d5069217 100644 --- a/pkg/framework/plugins/removeduplicates/removeduplicates_test.go +++ b/pkg/framework/plugins/removeduplicates/removeduplicates_test.go @@ -79,15 +79,6 @@ func buildTestPodWithRSOwnerRefWithNamespaceForNode1(name, namespace string, app func TestFindDuplicatePods(t *testing.T) { // first setup pods - node3 := buildTestNode(nodeName3, func(node *v1.Node) { - node.Spec.Taints = []v1.Taint{ - { - Key: "hardware", - Value: "gpu", - Effect: v1.TaintEffectNoSchedule, - }, - } - }) node4 := buildTestNode(nodeName4, func(node *v1.Node) { node.ObjectMeta.Labels = map[string]string{ "datacenter": "east", @@ -318,7 +309,15 @@ func TestFindDuplicatePods(t *testing.T) { }, nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node3, + buildTestNode(nodeName3, func(node *v1.Node) { + node.Spec.Taints = []v1.Taint{ + { + Key: "hardware", + Value: "gpu", + Effect: v1.TaintEffectNoSchedule, + }, + } + }), }, expectedEvictedPodCount: 0, nodefit: true,