110_shutdown_test.sh 587 B

1234567891011121314151617181920
  1. #! /bin/bash
  2. # shellcheck disable=SC1091
  3. . ./config.sh
  4. start_suite "Check scope exits cleanly within 5 seconds"
  5. scope_on "$HOST1" launch
  6. sleep 5
  7. scope_on "$HOST1" stop
  8. sleep 5
  9. # Save stdout for debugging output
  10. exec 3>&1
  11. assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'app exiting' || (docker_on $HOST1 logs weavescope 2>&3 ; false)"
  12. assert_raises "docker_on $HOST1 logs weavescope 2>&1 | grep 'probe exiting' || (docker_on $HOST1 logs weavescope 2>&3 ; false)"
  13. assert_raises "docker_on $HOST1 inspect --format='{{.State.Running}}' weavescope" "false"
  14. scope_end_suite