run-full-tests.sh 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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. # Setup storage & distribution
  36. HOST_IP=$(./get-host-ip.sh)
  37. export COLOSSUS_1_URL="http://${HOST_IP}:3333"
  38. export DISTRIBUTOR_1_URL="http://${HOST_IP}:3334"
  39. ./run-test-scenario.sh initStorageAndDistribution
  40. # Start colossus & argus
  41. docker-compose -f ../../docker-compose.yml up -d colossus-1
  42. docker-compose -f ../../docker-compose.yml up -d distributor-1
  43. # Run full tests reusing the existing keys
  44. REUSE_KEYS=true IGNORE_HIRED_LEADS=true ./run-test-scenario.sh $SCENARIO