Merge pull request #102 from mesosphere/dcos-837-app-restart

Improve error message for restart, closes DCOS-837.
This commit is contained in:
Sunil Shah
2015-04-06 14:59:06 -07:00
2 changed files with 4 additions and 3 deletions

View File

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

View File

@@ -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')