1
0
mirror of https://github.com/kubernetes-sigs/descheduler.git synced 2026-01-28 14:41:10 +01:00

fix(unit-test): add necessary ownerRef to the pod.

This commit is contained in:
zhifei92
2024-06-21 19:12:40 +08:00
parent cdbd101eae
commit ae15fed7e7
4 changed files with 31 additions and 8 deletions

View File

@@ -312,8 +312,8 @@ func TestRemovePodsHavingTooManyRestarts(t *testing.T) {
t.Run(tc.description, func(t *testing.T) {
pods := append(
initPods(node1),
test.BuildTestPod("CPU-consumer-1", 150, 100, node4.Name, nil),
test.BuildTestPod("CPU-consumer-2", 150, 100, node5.Name, nil),
test.BuildTestPod("CPU-consumer-1", 150, 100, node4.Name, test.SetNormalOwnerRef),
test.BuildTestPod("CPU-consumer-2", 150, 100, node5.Name, test.SetNormalOwnerRef),
)
if tc.applyFunc != nil {
tc.applyFunc(pods)