run-full-tests.sh 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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. # Clean start
  9. docker-compose -f ../../docker-compose.yml down -v
  10. if [ "${DEV_NODE}" == true ]
  11. then
  12. docker-compose -f ../../docker-compose.yml up -d joystream-node
  13. function cleanup() {
  14. docker logs joystream-node --tail 15
  15. docker-compose -f ../../docker-compose.yml down -v
  16. }
  17. trap cleanup EXIT
  18. else
  19. CONTAINER_ID=$(./run-test-node-docker.sh)
  20. function cleanup() {
  21. docker logs ${CONTAINER_ID} --tail 15
  22. docker-compose -f ../../docker-compose.yml down -v
  23. }
  24. trap cleanup EXIT
  25. fi
  26. # pass the scenario name without .ts extension
  27. SCENARIO=$1
  28. # default to "full" if scenario is not specified
  29. SCENARIO=${SCENARIO:=full}
  30. sleep 3
  31. # Display runtime version
  32. yarn workspace api-scripts tsnode-strict src/status.ts | grep Runtime
  33. # Start a query-node
  34. ../../query-node/start.sh
  35. # Start storage and distribution services
  36. REUSE_KEYS=true ./start-storage.sh
  37. # Run full tests reusing the existing keys
  38. REUSE_KEYS=true IGNORE_HIRED_LEADS=true ./run-test-scenario.sh $SCENARIO