mirror of
https://github.com/kubernetes-sigs/descheduler.git
synced 2026-01-28 14:41:10 +01:00
refactor(TestPodAntiAffinity): inline p6
This commit is contained in:
@@ -117,12 +117,6 @@ func buildTestPodNonEvictableForNode1() *v1.Pod {
|
|||||||
|
|
||||||
func TestPodAntiAffinity(t *testing.T) {
|
func TestPodAntiAffinity(t *testing.T) {
|
||||||
|
|
||||||
p6 := buildTestPodForNode1("p6", func(pod *v1.Pod) {
|
|
||||||
test.SetNormalOwnerRef(pod)
|
|
||||||
setLabelsFooBar(pod)
|
|
||||||
setPodAntiAffinityFoo1Bar1(pod)
|
|
||||||
test.SetPodPriority(pod, 50)
|
|
||||||
})
|
|
||||||
p7 := buildTestPodForNode1("p7", func(pod *v1.Pod) {
|
p7 := buildTestPodForNode1("p7", func(pod *v1.Pod) {
|
||||||
test.SetNormalOwnerRef(pod)
|
test.SetNormalOwnerRef(pod)
|
||||||
setLabelsFoo1Bar1(pod)
|
setLabelsFoo1Bar1(pod)
|
||||||
@@ -225,7 +219,13 @@ func TestPodAntiAffinity(t *testing.T) {
|
|||||||
setPodAntiAffinityFoo1Bar1(pod)
|
setPodAntiAffinityFoo1Bar1(pod)
|
||||||
test.SetPodPriority(pod, 100)
|
test.SetPodPriority(pod, 100)
|
||||||
}),
|
}),
|
||||||
p6, p7},
|
buildTestPodForNode1("p6", func(pod *v1.Pod) {
|
||||||
|
test.SetNormalOwnerRef(pod)
|
||||||
|
setLabelsFooBar(pod)
|
||||||
|
setPodAntiAffinityFoo1Bar1(pod)
|
||||||
|
test.SetPodPriority(pod, 50)
|
||||||
|
}),
|
||||||
|
p7},
|
||||||
nodes: []*v1.Node{
|
nodes: []*v1.Node{
|
||||||
buildTestNode1(),
|
buildTestNode1(),
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user