mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-27 21:47:07 +00:00
Merge pull request #48172 from gyliu513/const
Automatic merge from submit-queue (batch tested with PRs 48137, 48172) Used const variable in scheduler test. **What this PR does / why we need it**: **Which issue this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close that issue when PR gets merged)*: fixes # **Special notes for your reviewer**: **Release note**: ```release-note none ```
This commit is contained in:
commit
06fcfe23fc
@ -44,7 +44,7 @@ type FitError struct {
|
|||||||
|
|
||||||
var ErrNoNodesAvailable = fmt.Errorf("no nodes available to schedule pods")
|
var ErrNoNodesAvailable = fmt.Errorf("no nodes available to schedule pods")
|
||||||
|
|
||||||
const NoNodeAvailableMsg = "No nodes are available that match all of the following predicates:"
|
const NoNodeAvailableMsg = "No nodes are available that match all of the following predicates"
|
||||||
|
|
||||||
// Error returns detailed information of why the pod failed to fit on each node
|
// Error returns detailed information of why the pod failed to fit on each node
|
||||||
func (f *FitError) Error() string {
|
func (f *FitError) Error() string {
|
||||||
|
@ -410,7 +410,7 @@ func TestHumanReadableFitError(t *testing.T) {
|
|||||||
"3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderDiskPressure},
|
"3": []algorithm.PredicateFailureReason{algorithmpredicates.ErrNodeUnderDiskPressure},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
if strings.Contains(error.Error(), "No nodes are available that match all of the following predicates") {
|
if strings.Contains(error.Error(), NoNodeAvailableMsg) {
|
||||||
if strings.Contains(error.Error(), "NodeUnderDiskPressure (2)") && strings.Contains(error.Error(), "NodeUnderMemoryPressure (1)") {
|
if strings.Contains(error.Error(), "NodeUnderDiskPressure (2)") && strings.Contains(error.Error(), "NodeUnderMemoryPressure (1)") {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user