test-integration-cli 749 B

12345678910111213141516171819202122232425262728293031
  1. #!/bin/bash
  2. set -e
  3. bundle_test_integration_cli() {
  4. TESTFLAGS="$TESTFLAGS -check.v -check.timeout=${TIMEOUT} -test.timeout=360m"
  5. go_test_dir ./integration-cli
  6. }
  7. # subshell so that we can export PATH without breaking other things
  8. (
  9. bundle .integration-daemon-start
  10. bundle .integration-daemon-setup
  11. bundle_test_integration_cli
  12. bundle .integration-daemon-stop
  13. if [ "$(go env GOOS)" != 'windows' ]
  14. then
  15. leftovers=$(ps -ax -o pid,cmd | awk '$2 == "docker-containerd-shim" && $4 ~ /.*\/bundles\/.*\/test-integration-cli/ { print $1 }')
  16. if [ -n "$leftovers" ]
  17. then
  18. ps aux
  19. kill -9 $leftovers 2> /dev/null
  20. echo "!!!! WARNING you have left over shim(s), Cleanup your test !!!!"
  21. exit 1
  22. fi
  23. fi
  24. ) 2>&1 | tee -a "$DEST/test.log"