Merge pull request #102 from mesosphere/dcos-837-app-restart
Improve error message for restart, closes DCOS-837.
This commit is contained in:
@@ -547,7 +547,8 @@ def _restart(app_id, force):
|
||||
if desc['instances'] <= 0:
|
||||
app_id = client.normalize_app_id(app_id)
|
||||
emitter.publish(
|
||||
'Unable to restart application {!r} because it is stopped'.format(
|
||||
'Unable to perform rolling restart of application {!r} '
|
||||
'because it has no running tasks'.format(
|
||||
app_id,
|
||||
desc['instances']))
|
||||
return 1
|
||||
|
||||
@@ -377,8 +377,8 @@ def test_restarting_stopped_app():
|
||||
|
||||
assert returncode == 1
|
||||
assert stdout == (
|
||||
b"Unable to restart application '/zero-instance-app' "
|
||||
b"because it is stopped\n")
|
||||
b"Unable to perform rolling restart of application '"
|
||||
b"/zero-instance-app' because it has no running tasks\n")
|
||||
assert stderr == b''
|
||||
|
||||
_remove_app('zero-instance-app')
|
||||
|
||||
Reference in New Issue
Block a user