Skip to content

Commit

Permalink
feat: run script in docker container
Browse files Browse the repository at this point in the history
  • Loading branch information
njlie committed Aug 1, 2024
1 parent 909c53a commit a835667
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion test/performance/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,5 +23,5 @@ The test makes a few checks to verify the local playground is running, then runs
The test can also be run inside of a Docker container on the same Docker network as the Local Playground:

```
pnpm --filter performance run-docker-tests
pnpm --filter performance run-tests-docker
```
3 changes: 2 additions & 1 deletion test/performance/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "",
"scripts": {
"test": "k6 run ./scripts/create-outgoing-payments.js",
"test-docker": "docker run --rm --network=rafiki_rafiki -v ./scripts:/scripts -i grafana/k6 run /scripts/create-outgoing-payments.js",
"run-tests": "./scripts/run-tests.sh",
"docker-run-tests": "./scripts/run-docker-tests.sh",
"run-tests-docker": "./scripts/run-tests.sh --docker",
"hostile": "hostile"
},
"keywords": [],
Expand Down
6 changes: 5 additions & 1 deletion test/performance/scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,9 @@ addHost "happy-life-bank-backend"
addHost "happy-life-bank-auth"

# run tests
pnpm --filter performance test
if [[ $* == *--docker* ]]; then
pnpm --filter performance test-docker
else
pnpm --filter performance test
fi
exit $?

0 comments on commit a835667

Please sign in to comment.