diff options
| author | Jonathan Amsterdam <jba@google.com> | 2021-06-17 15:42:13 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2021-06-18 16:44:53 +0000 |
| commit | 05bc41b292ba2fcfed05bf51be565c26a0c78bee (patch) | |
| tree | e3f937aa8f4445deda62670c9842644c3d88a61f /internal/postgres | |
| parent | 39081725e2df789da4501c4910d9c459411a9ee8 (diff) | |
| download | go-x-pkgsite-05bc41b292ba2fcfed05bf51be565c26a0c78bee.tar.xz | |
config, etc: remove GO_DISCOVERY_DATABASE_DRIVER env var
Hard-code "pgx".
Change-Id: I5787d67704fddbee2f9b2f7b94497906b168a970
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/329170
Trust: Jonathan Amsterdam <jba@google.com>
Run-TryBot: Jonathan Amsterdam <jba@google.com>
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/postgres')
| -rw-r--r-- | internal/postgres/test_helper.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/internal/postgres/test_helper.go b/internal/postgres/test_helper.go index 6331d2d0..60054d65 100644 --- a/internal/postgres/test_helper.go +++ b/internal/postgres/test_helper.go @@ -28,8 +28,6 @@ import ( _ "github.com/golang-migrate/migrate/v4/database/postgres" // imported to register the file source migration driver _ "github.com/golang-migrate/migrate/v4/source/file" - // imported to register the postgres database driver - _ "github.com/lib/pq" ) // recreateDB drops and recreates the database named dbName. @@ -91,11 +89,7 @@ func SetupTestDB(dbName string) (_ *DB, err error) { return nil, fmt.Errorf("unfixable error migrating database: %v.\nConsider running ./devtools/drop_test_dbs.sh", err) } } - driver := os.Getenv("GO_DISCOVERY_DATABASE_DRIVER") - if driver == "" { - driver = "pgx" - } - db, err := database.Open(driver, dbtest.DBConnURI(dbName), "test") + db, err := database.Open("pgx", dbtest.DBConnURI(dbName), "test") if err != nil { return nil, err } |
