stop.feature 916 B

123456789101112131415161718192021222324252627282930
  1. Feature: Stop
  2. Background:
  3. Given a compose file
  4. """
  5. services:
  6. should_fail:
  7. image: alpine
  8. command: ls /does_not_exist
  9. sleep: # will be killed
  10. image: alpine
  11. command: ping localhost
  12. """
  13. Scenario: Cascade stop
  14. When I run "compose up --abort-on-container-exit"
  15. Then the output contains "should_fail-1 exited with code 1"
  16. And the output contains "Aborting on container exit..."
  17. And the exit code is 1
  18. Scenario: Exit code from
  19. When I run "compose up --exit-code-from sleep"
  20. Then the output contains "should_fail-1 exited with code 1"
  21. And the output contains "Aborting on container exit..."
  22. And the exit code is 137
  23. Scenario: Exit code from unknown service
  24. When I run "compose up --exit-code-from unknown"
  25. Then the output contains "no such service: unknown"
  26. And the exit code is 1