mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 19:56:01 +00:00
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:
commit
277f7614ea
@ -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 New Issue
Block a user