mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
Complement unit test case TestNodesWherePreemptionMightHelp for scheduler/core
This commit is contained in:
parent
31420467ae
commit
08e5f4573a
@ -1170,6 +1170,24 @@ func TestNodesWherePreemptionMightHelp(t *testing.T) {
|
|||||||
},
|
},
|
||||||
expected: map[string]bool{},
|
expected: map[string]bool{},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Node condition errors and ErrNodeUnknownCondition should be considered unresolvable",
|
||||||
|
failedPredMap: FailedPredicateMap{
|
||||||
|
"machine1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeNotReady},
|
||||||
|
"machine2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeNetworkUnavailable},
|
||||||
|
"machine3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnknownCondition},
|
||||||
|
},
|
||||||
|
expected: map[string]bool{"machine4": true},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ErrVolume... errors should not be tried as it indicates that the pod is unschedulable due to no matching volumes for pod on node",
|
||||||
|
failedPredMap: FailedPredicateMap{
|
||||||
|
"machine1": []algorithm.PredicateFailureReason{algorithmpredicates.ErrVolumeZoneConflict},
|
||||||
|
"machine2": []algorithm.PredicateFailureReason{algorithmpredicates.ErrVolumeNodeConflict},
|
||||||
|
"machine3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrVolumeBindConflict},
|
||||||
|
},
|
||||||
|
expected: map[string]bool{"machine4": true},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
for _, test := range tests {
|
for _, test := range tests {
|
||||||
|
Loading…
Reference in New Issue
Block a user