Skip to content

Commit

Permalink
test: improve Docker test configuration and environment setup
Browse files Browse the repository at this point in the history
Co-Authored-By: Nico Krause <[email protected]>
  • Loading branch information
devin-ai-integration[bot] and silkroadnomad committed Jan 18, 2025
1 parent 0702857 commit 9603c00
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
8 changes: 6 additions & 2 deletions docker-compose-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,11 @@ services:
volumes:
- ./docker/entrypoint.sh:/usr/src/app/entrypoint.sh
- ./relay/src:/usr/src/app/src
entrypoint: ["/usr/src/app/entrypoint.sh", "generate-key"]
entrypoint: ["/usr/src/app/entrypoint.sh", "test"]
environment:
- CI=true
- RELAY_LOCAL_REGTTEST=true
- NODE_ENV=test
ports:
- "1235:1235"
- "9091:9091"
Expand All @@ -47,4 +51,4 @@ services:
- electrumx

volumes:
doichain-data:
doichain-data:
9 changes: 7 additions & 2 deletions docker/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,15 @@ if [ "$1" == "generate-key" ]; then
elif [ "$1" == "start" ]; then
echo "Starting node..."
npm run start
elif [ "$1" == "test" ]; then
echo "Setting up test environment..."

echo "Running tests..."
npm run test
else
echo "Invalid command. Use 'generate-key' or 'start'."
echo "Invalid command. Use 'generate-key', 'start', or 'test'."
exit 1
fi

# Start the application if a valid command was provided
# exec "$@"
# exec "$@"

0 comments on commit 9603c00

Please sign in to comment.