run-tests.sh 920 B

123456789101112131415161718192021222324252627282930313233
  1. #!/usr/bin/env bash
  2. set -e
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. set -a
  6. . ../.env
  7. set +a
  8. function cleanup() {
  9. # Show tail end of logs for the processor and indexer containers to
  10. # see any possible errors
  11. (echo "\n\n## Processor Logs ##" && docker logs joystream_processor_1 --tail 50) || :
  12. (echo "\n\n## Indexer Logs ##" && docker logs joystream_indexer_1 --tail 50) || :
  13. (echo "\n\n## Indexer API Gateway Logs ##" && docker logs joystream_hydra-indexer-gateway_1 --tail 50) || :
  14. (echo "\n\n## Graphql Server Logs ##" && docker logs joystream_graphql-server_1 --tail 50) || :
  15. docker-compose down -v
  16. }
  17. trap cleanup EXIT
  18. # Clean start
  19. docker-compose down -v
  20. ./start.sh
  21. # pass the scenario name without .ts extension
  22. SCENARIO=$1
  23. # fallback if scenario if not specified
  24. SCENARIO=${SCENARIO:=full}
  25. time yarn workspace integration-tests run-test-scenario ${SCENARIO}