Commit e0d02f14 authored by Guangya Liu's avatar Guangya Liu

Used const variable in scheduler test.

parent 0ce58092
......@@ -44,7 +44,7 @@ type FitError struct {
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
func (f *FitError) Error() string {
......
......@@ -410,7 +410,7 @@ func TestHumanReadableFitError(t *testing.T) {
"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)") {
return
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment