Apply suggestions from code review

Co-Authored-By: preetapan <preetha@hashicorp.com>
This commit is contained in:
Michael Schurter 2019-01-11 08:21:29 -06:00 committed by Preetha Appan
parent 7bd1440710
commit dbf4c3a3c8
No known key found for this signature in database
GPG Key ID: 9F7C19990A50EAFC
2 changed files with 2 additions and 2 deletions

View File

@ -1977,7 +1977,7 @@ func makeFailedAlloc(add *structs.Allocation, err error) *structs.Allocation {
stripped.ID = add.ID
stripped.NodeID = add.NodeID
stripped.ClientStatus = structs.AllocClientStatusFailed
stripped.ClientDescription = fmt.Sprintf("Unable to add allocation due to err: %v", err)
stripped.ClientDescription = fmt.Sprintf("Unable to add allocation due to error: %v", err)
// Copy task states if it exists in the original allocation
if add.TaskStates != nil {

View File

@ -720,7 +720,7 @@ func TestClient_RestoreError(t *testing.T) {
}
return true, nil
}, func(err error) {
t.Fatalf("err: %v", err)
require.NoError(err)
})
}