mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-26 13:29:11 +01:00
refactor(node_taint_test): inline p12
This commit is contained in:
@@ -154,12 +154,6 @@ func withKubeSystemCriticalPod(pod *v1.Pod) {
|
||||
}
|
||||
|
||||
func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
||||
p12 := buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
|
||||
pod.Spec.NodeSelector = map[string]string{
|
||||
datacenterLabel: datacenterWest,
|
||||
}
|
||||
})
|
||||
|
||||
// The following 4 pods won't get evicted.
|
||||
// A Critical Pod.
|
||||
// A daemonset.
|
||||
@@ -347,7 +341,11 @@ func TestDeletePodsViolatingNodeTaints(t *testing.T) {
|
||||
pods: []*v1.Pod{
|
||||
buildTestPodWithNormalOwnerRef("p1", nodeName1, withTestTaintToleration1),
|
||||
buildTestPodWithNormalOwnerRef("p3", nodeName1, withTestTaintToleration1),
|
||||
p12,
|
||||
buildTestPodWithNormalOwnerRef("p11", nodeName2, func(pod *v1.Pod) {
|
||||
pod.Spec.NodeSelector = map[string]string{
|
||||
datacenterLabel: datacenterWest,
|
||||
}
|
||||
}),
|
||||
},
|
||||
nodes: []*v1.Node{
|
||||
buildTestNode(nodeName1, withTestTaint1),
|
||||
|
||||
Reference in New Issue
Block a user