From 6e62af3dbf70b88d848fc72e83155f6c1522afe5 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sun, 14 Dec 2025 16:10:28 +0100 Subject: [PATCH] refactor(TestFindDuplicatePods): inline node5 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 0e23ba2ee..3eef2a124 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 - node5 := buildTestNode(nodeName5, func(node *v1.Node) { - node.Spec = v1.NodeSpec{ - Unschedulable: true, - } - }) node6 := test.BuildTestNode(nodeName6, 200, 200, 10, nil) // Three Pods in the "dev" Namespace, bound to same ReplicaSet. 2 should be evicted. @@ -356,7 +351,11 @@ func TestFindDuplicatePods(t *testing.T) { }, nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node5, + buildTestNode(nodeName5, func(node *v1.Node) { + node.Spec = v1.NodeSpec{ + Unschedulable: true, + } + }), }, expectedEvictedPodCount: 0, nodefit: true,