Add failing test for --abort-on-container-exit

Handle --abort-on-container-exit. Fixes #2940

Signed-off-by: Richard Bann <richardbann@gmail.com>
This commit is contained in:
Richard Bann 2016-02-18 12:13:16 +01:00 committed by Daniel Nephin
commit bf2bf21720
4 changed files with 21 additions and 3 deletions

View file

@ -774,6 +774,9 @@ def up_shutdown_context(project, service_names, timeout, detached):
except signals.ShutdownException:
print("Gracefully stopping... (press Ctrl+C again to force)")
project.stop(service_names=service_names, timeout=timeout)
except signals.CascadeStopException:
print("Aborting on container exit... (press Ctrl+C to force)")
project.stop(service_names=service_names, timeout=timeout)
except signals.ShutdownException:
project.kill(service_names=service_names)
sys.exit(2)