From 2658864ac0b00036d0653303742fe37296be5e8b Mon Sep 17 00:00:00 2001 From: Jan Chaloupka Date: Sat, 13 Dec 2025 13:51:12 +0100 Subject: [PATCH] refactor(TestPodLifeTime): extract eviction limits tests --- .../plugins/podlifetime/pod_lifetime_test.go | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/pkg/framework/plugins/podlifetime/pod_lifetime_test.go b/pkg/framework/plugins/podlifetime/pod_lifetime_test.go index 5486bc014..62ce00491 100644 --- a/pkg/framework/plugins/podlifetime/pod_lifetime_test.go +++ b/pkg/framework/plugins/podlifetime/pod_lifetime_test.go @@ -221,6 +221,18 @@ func TestPodLifeTime(t *testing.T) { nodes: []*v1.Node{buildTestNode1()}, expectedEvictedPodCount: 0, }, + } + + for _, tc := range testCases { + t.Run(tc.description, func(t *testing.T) { + runPodLifeTimeTest(t, tc) + }) + } +} + +func TestPodLifeTime_EvictionLimits(t *testing.T) { + var maxLifeTime uint = 600 + testCases := []podLifeTimeTestCase{ { description: "2 Oldest pods should be evicted when maxPodsToEvictPerNode and maxPodsToEvictPerNamespace are not set", args: &PodLifeTimeArgs{