1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-26 05:14:13 +01:00

refactor(TestPodLifeTime): extract eviction limits tests

This commit is contained in:
Jan Chaloupka
2025-12-13 13:51:12 +01:00
parent e05de87368
commit 2658864ac0

View File

@@ -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{