From ee73336fd8272c389a2dfe5f43dcd6197edeb091 Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Mon, 15 Dec 2025 12:12:33 +0100 Subject: [PATCH] refactor(TestRemovePodsHavingTooManyRestarts): inline node5 --- .../toomanyrestarts_test.go | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkg/framework/plugins/removepodshavingtoomanyrestarts/toomanyrestarts_test.go b/pkg/framework/plugins/removepodshavingtoomanyrestarts/toomanyrestarts_test.go index f85b8eb2b..b5bcddb26 100644 --- a/pkg/framework/plugins/removepodshavingtoomanyrestarts/toomanyrestarts_test.go +++ b/pkg/framework/plugins/removepodshavingtoomanyrestarts/toomanyrestarts_test.go @@ -130,8 +130,6 @@ func initPods(apply func(pod *v1.Pod)) []*v1.Pod { } func TestRemovePodsHavingTooManyRestarts(t *testing.T) { - node5 := buildTestNode(nodeName5, nil) - createRemovePodsHavingTooManyRestartsAgrs := func( podRestartThresholds int32, includingInitContainers bool, @@ -301,7 +299,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) { pods: initPods(nil), nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node5, + buildTestNode(nodeName5, nil), }, expectedEvictedPodCount: 3, maxPodsToEvictPerNode: &uint3, @@ -319,7 +317,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) { }), nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node5, + buildTestNode(nodeName5, nil), }, expectedEvictedPodCount: 3, maxPodsToEvictPerNode: &uint3, @@ -331,7 +329,7 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) { pods: initPods(nil), nodes: []*v1.Node{ buildTestNode(nodeName1, nil), - node5, + buildTestNode(nodeName5, nil), }, expectedEvictedPodCount: 0, maxPodsToEvictPerNode: &uint3,