run-storage-node-tests.sh 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. docker-compose down -v
  14. }
  15. trap cleanup EXIT
  16. # clean start
  17. docker-compose down -v
  18. docker-compose up -d joystream-node
  19. # Storage node
  20. DEBUG=joystream:storage-cli:dev yarn storage-cli dev-init
  21. docker-compose up -d colossus
  22. # Query node is expected to have been already built
  23. docker-compose up -d db
  24. yarn workspace query-node-root db:migrate
  25. docker-compose up -d graphql-server
  26. # Starting up processor will bring up all services it depends on
  27. docker-compose up -d processor
  28. # Fixes Error: No active storage providers available
  29. echo "Wait for colossus to announce public url"
  30. sleep 6
  31. echo "Creating channel..."
  32. yarn joystream-cli media:createChannel \
  33. --input ./assets/TestChannel.json --confirm
  34. echo "Uploading video..."
  35. yes | yarn joystream-cli media:uploadVideo ./assets/joystream.MOV \
  36. --input ./assets/TestVideo.json \
  37. --confirm
  38. time DEBUG=* yarn workspace network-tests run-test-scenario storage-node