run-tests.sh 727 B

123456789101112131415161718192021222324252627
  1. #!/usr/bin/env bash
  2. set -e
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. function cleanup() {
  6. # Show tail end of logs for the processor and indexer containers to
  7. # see any possible errors
  8. (echo "## Processor Logs ##" && docker logs query-node_processor_1 --tail 50) || :
  9. (echo "## Indexer Logs ##" && docker logs query-node_indexer_1 --tail 50) || :
  10. docker-compose down -v
  11. }
  12. trap cleanup EXIT
  13. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944/
  14. # Only run codegen if no generated files found
  15. [ ! -d "generated/" ] && yarn codegen:all
  16. yarn db:up
  17. yarn db:migrate
  18. yarn docker:up
  19. # Run tests
  20. ATTACH_TO_NETWORK=query-node_default ../tests/network-tests/run-tests.sh content-directory