-
Notifications
You must be signed in to change notification settings - Fork 385
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
scripts: dev script to start postgres before tests #3344
Conversation
scripts/test-sim-dev.sh
Outdated
SCRIPTDIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )" | ||
|
||
CONTAINER_NAME=storj_sim_postgres | ||
docker run -d --rm -p 5433:5432 --name $CONTAINER_NAME postgres:9.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be really nice to be able to collect logs from this postgres somewhere, either live or before the container is destroyed. maybe the best way would be to do docker logs $CONTAINER_NAME > $tmpfile
in the cleanup function? or perhaps starting up something like tail -f $(docker inspect --format '{{.LogPath}}' $CONTAINER_NAME) > $tmpfile &
here?
And then we could add -c log_min_duration_statement=0
to this invocation, and get nice logs about every query that goes through, for those times when we care.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I will try to combine it somehow :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
live logging done
(cherry picked from commit da2eaa7)
What: Script for developers to run integration tests easier after removing storj-sim sqlite support. This script wraps main script and adds postgres (docker) server start, waits for the server to be available and starts integration tests.
Why: Now all developers need to have postgres configured or use docker image. This should our lives a little bit.
Please describe the tests:
Please describe the performance impact: none
Code Review Checklist (to be filled out by reviewer)