run-tests.sh 754 B

12345678910111213141516171819202122232425262728293031
  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 ##"
  9. docker logs query-node_processor_1 --tail 50
  10. echo "## Indexer Logs ##"
  11. docker logs query-node_indexer_1 --tail 50
  12. docker-compose down -v
  13. }
  14. trap cleanup EXIT
  15. # The endpoint name comes from the expected container name for joystream/node
  16. # in tests/network-tests/run-tests.sh
  17. export WS_PROVIDER_ENDPOINT_URI=ws://joystream-node:9944/
  18. yarn build
  19. yarn db:up
  20. yarn db:migrate
  21. yarn docker:up
  22. # Run tests
  23. ATTACH_TO_NETWORK=query-node_default ../tests/network-tests/run-tests.sh content-directory