run-full-tests.sh 1.1 KB

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