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:
Kubernetes Submit Queue 2017-06-28 22:03:29 -07:00 committed by GitHub
commit 06fcfe23fc
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
}