test-integration-cli 734 B

1234567891011121314151617181920212223242526272829303132
  1. #!/bin/bash
  2. set -e
  3. DEST=$1
  4. bundle_test_integration_cli() {
  5. go_test_dir ./integration-cli
  6. }
  7. # subshell so that we can export PATH without breaking other things
  8. (
  9. source "$(dirname "$BASH_SOURCE")/.integration-daemon-start"
  10. # we need to wrap up everything in between integration-daemon-start and
  11. # integration-daemon-stop to make sure we kill the daemon and don't hang,
  12. # even and especially on test failures
  13. didFail=
  14. if ! {
  15. # pull the busybox image before running the tests
  16. sleep 2
  17. source "$(dirname "$BASH_SOURCE")/.ensure-busybox"
  18. bundle_test_integration_cli
  19. }; then
  20. didFail=1
  21. fi
  22. source "$(dirname "$BASH_SOURCE")/.integration-daemon-stop"
  23. [ -z "$didFail" ] # "set -e" ftw
  24. ) 2>&1 | tee -a $DEST/test.log