run-tests.sh 1020 B

123456789101112131415161718192021222324252627282930313233343536
  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. export JOYSTREAM_NODE_TAG=${JOYSTREAM_NODE_TAG:=$(../scripts/runtime-code-shasum.sh)}
  9. function cleanup() {
  10. # Show tail end of logs for the processor and indexer containers to
  11. # see any possible errors
  12. (echo "\n\n## Processor Logs ##" && docker logs processor --tail 50) || :
  13. (echo "\n\n## Indexer Logs ##" && docker logs indexer --tail 50) || :
  14. (echo "\n\n## Indexer API Gateway Logs ##" && docker logs hydra-indexer-gateway --tail 50) || :
  15. (echo "\n\n## Graphql Server Logs ##" && docker logs graphql-server --tail 50) || :
  16. docker-compose down -v
  17. }
  18. trap cleanup EXIT
  19. # Clean start
  20. docker-compose down -v
  21. docker-compose -f ../docker-compose.yml up -d joystream-node
  22. ./start.sh
  23. # pass the scenario name without .ts extension
  24. SCENARIO=$1
  25. # fallback if scenario if not specified
  26. SCENARIO=${SCENARIO:=full}
  27. time yarn workspace integration-tests run-test-scenario ${SCENARIO}