File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed
test/integration/scheduler Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -480,6 +480,33 @@ func TestSchedulerInformers(t *testing.T) {
480
480
}),
481
481
preemptedPodIndexes : map [int ]struct {}{2 : {}},
482
482
},
483
+ {
484
+ name : "The pod cannot be scheduled when nodeAffinity specifies a non-existent node." ,
485
+ nodes : []* nodeConfig {{name : "node-1" , res : defaultNodeRes }},
486
+ existingPods : []* v1.Pod {},
487
+ pod : testutils .InitPausePod (& testutils.PausePodConfig {
488
+ Name : "unschedulable-pod" ,
489
+ Namespace : testCtx .NS .Name ,
490
+ Affinity : & v1.Affinity {
491
+ NodeAffinity : & v1.NodeAffinity {
492
+ RequiredDuringSchedulingIgnoredDuringExecution : & v1.NodeSelector {
493
+ NodeSelectorTerms : []v1.NodeSelectorTerm {
494
+ {
495
+ MatchFields : []v1.NodeSelectorRequirement {
496
+ {
497
+ Key : "metadata.name" ,
498
+ Operator : v1 .NodeSelectorOpIn ,
499
+ Values : []string {"invalid-node" },
500
+ },
501
+ },
502
+ },
503
+ },
504
+ },
505
+ },
506
+ },
507
+ Resources : defaultPodRes ,
508
+ }),
509
+ },
483
510
}
484
511
485
512
for _ , test := range tests {
You can’t perform that action at this time.
0 commit comments