stop.feature 939 B

12345678910111213141516171819202122232425262728293031
  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. init: true
  13. """
  14. Scenario: Cascade stop
  15. When I run "compose up --abort-on-container-exit"
  16. Then the output contains "should_fail-1 exited with code 1"
  17. And the output contains "Aborting on container exit..."
  18. And the exit code is 1
  19. Scenario: Exit code from
  20. When I run "compose up --exit-code-from sleep"
  21. Then the output contains "should_fail-1 exited with code 1"
  22. And the output contains "Aborting on container exit..."
  23. And the exit code is 143
  24. Scenario: Exit code from unknown service
  25. When I run "compose up --exit-code-from unknown"
  26. Then the output contains "no such service: unknown"
  27. And the exit code is 1