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

refactor(node_taint_test): inline p11

This commit is contained in:
Jan Chaloupka
2025-12-15 18:09:22 +01:00
parent c1ad532c46
commit 50b6e178c1

View File

@@ -154,7 +154,6 @@ func withKubeSystemCriticalPod(pod *v1.Pod) {
} }
func TestDeletePodsViolatingNodeTaints(t *testing.T) { func TestDeletePodsViolatingNodeTaints(t *testing.T) {
p11 := buildTestPodWithNormalOwnerRef("p11", nodeName2, nil)
p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) { p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
pod.Spec.NodeSelector = map[string]string{ pod.Spec.NodeSelector = map[string]string{
datacenterLabel: datacenterWest, datacenterLabel: datacenterWest,
@@ -307,7 +306,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod), buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
buildTestPod("p8", nodeName2, test.SetDSOwnerRef), buildTestPod("p8", nodeName2, test.SetDSOwnerRef),
buildTestPodWithNormalOwnerRef("p10", nodeName2, test.SetMirrorPodAnnotation), buildTestPodWithNormalOwnerRef("p10", nodeName2, test.SetMirrorPodAnnotation),
p11, buildTestPodWithNormalOwnerRef("p11", nodeName2, nil),
}, },
nodes: []*v1.Node{ nodes: []*v1.Node{
buildTestNode(nodeName2, withTestingTaint1), buildTestNode(nodeName2, withTestingTaint1),