run-tests.sh 1011 B

1234567891011121314151617181920212223242526272829303132333435
  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 "## Processor Logs ##" && docker logs joystream_processor_1 --tail 50) || :
  12. (echo "## Indexer Logs ##" && docker logs joystream_indexer_1 --tail 50) || :
  13. (echo "## Indexer API Gateway Logs ##" && docker logs joystream_hydra-indexer-gateway_1 --tail 50) || :
  14. (echo "## Graphql Server Logs ##" && docker logs joystream_graphql-server_1 --tail 50) || :
  15. docker-compose down -v
  16. }
  17. trap cleanup EXIT
  18. # Bring up db
  19. docker-compose up -d db
  20. # Migrate the databases
  21. yarn workspace query-node-root db:prepare
  22. yarn workspace query-node-root db:migrate
  23. docker-compose up -d graphql-server
  24. # Starting up processor will bring up all services it depends on
  25. docker-compose up -d processor
  26. time yarn workspace network-tests run-test-scenario content-directory