Skip to content
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

Add docker start/stop script for DB unit tests #385

Merged
merged 2 commits into from
Feb 22, 2017

Conversation

kjin
Copy link
Contributor

@kjin kjin commented Feb 14, 2017

This change adds a script to run docker containers to support local unit testing. It's not needed on any CI.

./bin/docker-trace.sh start starts docker containers listening locally for mongoDB, redis, and MySQL connections.

./bin/docker-trace.sh stop stops them (though, in a somewhat unsafe way).

@googlebot googlebot added the cla: yes This human has signed the Contributor License Agreement. label Feb 14, 2017
docker run -p 127.0.0.1:3306:3306 -e MYSQL_ROOT_PASSWORD='Password12!' -e MYSQL_DATABASE=test -d mysql
fi
if [ $COMMAND = 'stop' ]; then
docker stop `docker ps | sed -En 's/([a-f0-9]+)[[:space:]]+(redis|mongo|mysql).*/\1/p'`

This comment was marked as spam.

This comment was marked as spam.

This comment was marked as spam.

@ofrobots ofrobots merged commit 8553d02 into googleapis:master Feb 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants