mirror of
https://github.com/kubernetes/kubernetes.git
synced 2026-05-28 04:04:39 -04:00
/pkg/scheduler/framework/plugins/ : remove the repeat test example and add an test example
This commit is contained in:
parent
b9c370c90f
commit
6180d701cc
1 changed files with 8 additions and 7 deletions
|
|
@ -578,19 +578,20 @@ func TestZoneSelectorSpreadPriority(t *testing.T) {
|
|||
pods: []*v1.Pod{
|
||||
buildPod(nodeMachine1Zone1, labels1, nil),
|
||||
buildPod(nodeMachine1Zone2, labels1, nil),
|
||||
buildPod(nodeMachine1Zone3, labels1, nil),
|
||||
buildPod(nodeMachine2Zone2, labels1, nil),
|
||||
buildPod(nodeMachine2Zone2, labels2, nil),
|
||||
buildPod(nodeMachine1Zone3, labels1, nil),
|
||||
},
|
||||
services: []*v1.Service{{Spec: v1.ServiceSpec{Selector: labels1}}},
|
||||
expectedList: []framework.NodeScore{
|
||||
{Name: nodeMachine1Zone1, Score: 0}, // Pod on node
|
||||
{Name: nodeMachine1Zone1, Score: 33}, // Pod on node
|
||||
{Name: nodeMachine1Zone2, Score: 0}, // Pod on node
|
||||
{Name: nodeMachine2Zone2, Score: 33}, // Pod in zone
|
||||
{Name: nodeMachine1Zone3, Score: 0}, // Pod on node
|
||||
{Name: nodeMachine2Zone3, Score: 33}, // Pod in zone
|
||||
{Name: nodeMachine3Zone3, Score: 33}, // Pod in zone
|
||||
{Name: nodeMachine2Zone2, Score: 0}, // Pod in zone
|
||||
{Name: nodeMachine1Zone3, Score: 33}, // Pod on node
|
||||
{Name: nodeMachine2Zone3, Score: 66}, // Pod in zone
|
||||
{Name: nodeMachine3Zone3, Score: 66}, // Pod in zone
|
||||
},
|
||||
name: "four pods, 3 matching (z1=1, z2=1, z3=1)",
|
||||
name: "five pods, 4 matching (z1=1, z2=2, z3=1)",
|
||||
},
|
||||
{
|
||||
pod: buildPod("", labels1, controllerRef("ReplicationController", "name", "abc123")),
|
||||
|
|
|
|||
Loading…
Reference in a new issue