mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
refactor(TestPodLifeTime): extract eviction limits tests
This commit is contained in:
@@ -221,6 +221,18 @@ func TestPodLifeTime(t *testing.T) {
|
|||||||
nodes: []*v1.Node{buildTestNode1()},
|
nodes: []*v1.Node{buildTestNode1()},
|
||||||
expectedEvictedPodCount: 0,
|
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",
|
description: "2 Oldest pods should be evicted when maxPodsToEvictPerNode and maxPodsToEvictPerNamespace are not set",
|
||||||
args: &PodLifeTimeArgs{
|
args: &PodLifeTimeArgs{
|
||||||
|
|||||||
Reference in New Issue
Block a user