(t testing.TB, opts ...stdlib.OptionOpenDB)
| 28 | ) |
| 29 | |
| 30 | func openDB(t testing.TB, opts ...stdlib.OptionOpenDB) *sql.DB { |
| 31 | t.Helper() |
| 32 | config, err := pgx.ParseConfig(os.Getenv("PGX_TEST_DATABASE")) |
| 33 | require.NoError(t, err) |
| 34 | return stdlib.OpenDB(*config, opts...) |
| 35 | } |
| 36 | |
| 37 | func closeDB(t testing.TB, db *sql.DB) { |
| 38 | err := db.Close() |
no test coverage detected