mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 06:29:29 +01:00
refactor(node_taint_test): inline p9
This commit is contained in:
@@ -154,7 +154,6 @@ func withKubeSystemCriticalPod(pod *v1.Pod) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
||||||
p9 := buildTestPodWithNormalOwnerRef("p9", nodeName2, withLocalStorageVolume)
|
|
||||||
p10 := buildTestPodWithNormalOwnerRef("p10", nodeName2, test.SetMirrorPodAnnotation)
|
p10 := buildTestPodWithNormalOwnerRef("p10", nodeName2, test.SetMirrorPodAnnotation)
|
||||||
p11 := buildTestPodWithNormalOwnerRef("p11", nodeName2, nil)
|
p11 := buildTestPodWithNormalOwnerRef("p11", nodeName2, nil)
|
||||||
p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
|
p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
|
||||||
@@ -281,7 +280,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
pods: []*v1.Pod{
|
pods: []*v1.Pod{
|
||||||
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
||||||
buildTestPod("p8", nodeName2, test.SetDSOwnerRef),
|
buildTestPod("p8", nodeName2, test.SetDSOwnerRef),
|
||||||
p9,
|
buildTestPodWithNormalOwnerRef("p9", nodeName2, withLocalStorageVolume),
|
||||||
p10,
|
p10,
|
||||||
},
|
},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
@@ -294,7 +293,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
pods: []*v1.Pod{
|
pods: []*v1.Pod{
|
||||||
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
||||||
buildTestPod("p8", nodeName2, test.SetDSOwnerRef),
|
buildTestPod("p8", nodeName2, test.SetDSOwnerRef),
|
||||||
p9,
|
buildTestPodWithNormalOwnerRef("p9", nodeName2, withLocalStorageVolume),
|
||||||
p10,
|
p10,
|
||||||
},
|
},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
@@ -321,7 +320,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
pods: []*v1.Pod{
|
pods: []*v1.Pod{
|
||||||
buildTestPodWithNormalOwnerRef("p2", nodeName1, nil),
|
buildTestPodWithNormalOwnerRef("p2", nodeName1, nil),
|
||||||
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
||||||
p9,
|
buildTestPodWithNormalOwnerRef("p9", nodeName2, withLocalStorageVolume),
|
||||||
p10,
|
p10,
|
||||||
},
|
},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
@@ -428,7 +427,7 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
|||||||
pods: []*v1.Pod{
|
pods: []*v1.Pod{
|
||||||
buildTestPodWithNormalOwnerRef("p2", nodeName1, nil),
|
buildTestPodWithNormalOwnerRef("p2", nodeName1, nil),
|
||||||
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
buildTestPodWithNormalOwnerRef("p7", nodeName2, withKubeSystemCriticalPod),
|
||||||
p9,
|
buildTestPodWithNormalOwnerRef("p9", nodeName2, withLocalStorageVolume),
|
||||||
p10,
|
p10,
|
||||||
},
|
},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
|
|||||||
Reference in New Issue
Block a user