run-test-scenario.sh 674 B

1234567891011121314151617181920
  1. #!/usr/bin/env bash
  2. set -e
  3. SCRIPT_PATH="$(dirname "${BASH_SOURCE[0]}")"
  4. cd $SCRIPT_PATH
  5. # pass the scenario name without .ts extension
  6. SCENARIO=$1
  7. # fallback if scenario if not specified
  8. SCENARIO=${SCENARIO:=full}
  9. if [ -n "$RUNTIME_UPGRADE_TARGET_IMAGE_TAG" ]; then
  10. export RUNTIME_UPGRADE_TARGET_WASM_PATH=${RUNTIME_UPGRADE_TARGET_WASM_PATH:="./target-runtime.wasm"}
  11. id=`docker create joystream/node:${RUNTIME_UPGRADE_TARGET_IMAGE_TAG}`
  12. docker cp $id:/joystream/runtime.compact.wasm $RUNTIME_UPGRADE_TARGET_WASM_PATH
  13. docker rm $id
  14. fi
  15. # Execute the tests
  16. time DEBUG=integration-tests:* yarn workspace integration-tests node-ts-strict src/scenarios/${SCENARIO}.ts