mirror of
https://github.com/kemko/nomad.git
synced 2026-01-11 04:45:42 +03:00
e2e: StopJob should tolerate progress deadline expired (#12179)
The `TestRescheduleProgressDeadlineFail` E2E test failed during test cleanup because the error message "progress deadline expired" that it emits when we stop the job does not match the one expected from monitoring the `job stop` command. Update the `StopJob` helper to tolerate this use case as well.
This commit is contained in:
@@ -211,7 +211,8 @@ func StopJob(jobID string, args ...string) error {
|
||||
// expect that the monitor fails and exits with status code one because
|
||||
// technically the deployment has failed. Overwrite the error to be
|
||||
// nil.
|
||||
if strings.Contains(err.Error(), "Description = Cancelled because job is stopped") {
|
||||
if strings.Contains(err.Error(), "Description = Cancelled because job is stopped") ||
|
||||
strings.Contains(err.Error(), "Description = Failed due to progress deadline") {
|
||||
err = nil
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user