Used const variable in scheduler test.

pull/6/head
Guangya Liu 2017-06-28 11:36:35 +08:00
parent 0ce580928a
commit e0d02f140e
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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
}