Skip to content

Instantly share code, notes, and snippets.

@samonzeweb
Created October 22, 2017 15:48
Show Gist options
  • Select an option

  • Save samonzeweb/fd7264cd38d4593bf2aadc04b4b6cfa9 to your computer and use it in GitHub Desktop.

Select an option

Save samonzeweb/fd7264cd38d4593bf2aadc04b4b6cfa9 to your computer and use it in GitHub Desktop.
Testing godb on PostgreSQL through docker (OSX/Linux)
#!/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