Merge pull request #90203 from tanjunchen/remove-repeat-test-sche

/pkg/scheduler/framework/plugins/ : remove the repeat test example and add an test example
This commit is contained in:
Kubernetes Prow Robot 2020-04-24 12:15:20 -07:00 committed by GitHub
commit 277f7614ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")),