mirror of https://github.com/jackc/pgx.git
Use pgx.ParseConnectionString in test helper
This allows using URI or DSN for database connection information. DSN allows using unix domain sockets.batch-wip
parent
f7d3c4e151
commit
73471ea3fe
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue