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

refactor: inline single-statement apply functions in BuildTestPod calls

This commit is contained in:
Jan Chaloupka
2025-12-21 21:41:59 +01:00
parent 988e0b8868
commit 7ef3673d4c
3 changed files with 8 additions and 24 deletions

View File

@@ -144,9 +144,7 @@ func TestFindDuplicatePods(t *testing.T) {
{
description: "Pods are: part of DaemonSet, with local storage, mirror pod annotation, critical pod annotation - none should be evicted.",
pods: []*v1.Pod{
buildTestPodForNode("p4", nodeName1, func(pod *v1.Pod) {
test.SetDSOwnerRef(pod)
}),
buildTestPodForNode("p4", nodeName1, test.SetDSOwnerRef),
buildTestPodForNode("p5", nodeName1, func(pod *v1.Pod) {
test.SetNormalOwnerRef(pod)
test.SetHostPathEmptyDirVolumeSource(pod)
@@ -171,9 +169,7 @@ func TestFindDuplicatePods(t *testing.T) {
buildTestPodWithRSOwnerRefWithNamespaceForNode1("p1", "dev", nil),
buildTestPodWithRSOwnerRefWithNamespaceForNode1("p2", "dev", nil),
buildTestPodWithRSOwnerRefWithNamespaceForNode1("p3", "dev", nil),
buildTestPodForNode("p4", nodeName1, func(pod *v1.Pod) {
test.SetDSOwnerRef(pod)
}),
buildTestPodForNode("p4", nodeName1, test.SetDSOwnerRef),
buildTestPodForNode("p5", nodeName1, func(pod *v1.Pod) {
test.SetNormalOwnerRef(pod)
test.SetHostPathEmptyDirVolumeSource(pod)