Use pgx.ParseConnectionString in test helper

This allows using URI or DSN for database connection information. DSN allows
using unix domain sockets.
batch-wip
Jack Christensen 2017-04-14 17:21:32 -05:00
parent f7d3c4e151
commit 73471ea3fe
1 changed files with 1 additions and 1 deletions

View File

@ -35,7 +35,7 @@ func MustConnectDatabaseSQL(t testing.TB, driverName string) *sql.DB {
}
func MustConnectPgx(t testing.TB) *pgx.Conn {
config, err := pgx.ParseURI(os.Getenv("PGX_TEST_DATABASE"))
config, err := pgx.ParseConnectionString(os.Getenv("PGX_TEST_DATABASE"))
if err != nil {
t.Fatal(err)
}