Created
October 22, 2017 15:48
-
-
Save samonzeweb/fd7264cd38d4593bf2aadc04b4b6cfa9 to your computer and use it in GitHub Desktop.
Testing godb on PostgreSQL through docker (OSX/Linux)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Testing godb ( https://github.com/samonzeweb/godb ) with PostgreSQL | |
| docker run --name postgresql -e 'POSTGRES_PASSWORD=NotSoStr0ngPassword' -p 5432:5432 -d postgres:latest | |
| sleep 5 | |
| # See https://godoc.org/github.com/lib/pq#hdr-Connection_String_Parameters | |
| GODB_POSTGRESQL="postgres://postgres:NotSoStr0ngPassword@localhost/postgres?sslmode=disable" go test | |
| docker stop postgresql | |
| docker rm postgresql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment