diff --git a/cli/dcoscli/marathon/main.py b/cli/dcoscli/marathon/main.py index 540d144..74e5b8d 100644 --- a/cli/dcoscli/marathon/main.py +++ b/cli/dcoscli/marathon/main.py @@ -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 diff --git a/cli/tests/integrations/cli/test_marathon.py b/cli/tests/integrations/cli/test_marathon.py index e95f13a..92659e7 100644 --- a/cli/tests/integrations/cli/test_marathon.py +++ b/cli/tests/integrations/cli/test_marathon.py @@ -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')