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

refactor(TestFindDuplicatePods): set owner refs through a dedicated function

This commit is contained in:
Jan Chaloupka
2025-12-14 13:17:22 +01:00
parent 59f499e2cd
commit f5253faeb0

View File

@@ -88,11 +88,11 @@ func TestFindDuplicatePods(t *testing.T) {
})
// A DaemonSet.
p4 := buildTestPodForNode1("p4", func(pod *v1.Pod) {
pod.ObjectMeta.OwnerReferences = test.GetDaemonSetOwnerRefList()
test.SetDSOwnerRef(pod)
})
// A Pod with local storage.
p5 := buildTestPodForNode1("p5", func(pod *v1.Pod) {
pod.ObjectMeta.OwnerReferences = test.GetNormalPodOwnerRefList()
test.SetNormalOwnerRef(pod)
pod.Spec.Volumes = []v1.Volume{
{
Name: "sample",