diff options
| author | Jonathan Amsterdam <jba@google.com> | 2020-06-22 08:55:53 -0400 |
|---|---|---|
| committer | Jonathan Amsterdam <jba@google.com> | 2020-06-22 14:34:26 +0000 |
| commit | ccd36309fc414fa6d64130ab861503cf3171bca8 (patch) | |
| tree | c1c185bccf574e67141f789c904e0f79079436da /internal/database/database_test.go | |
| parent | 43a5edf9d37cf8db18da028a55b505c3ad9344ea (diff) | |
| download | go-x-pkgsite-ccd36309fc414fa6d64130ab861503cf3171bca8.tar.xz | |
all.bash,internal: force DB testing in CI
If the environment variable GO_DISCOVERY_TESTDB is "true" wherever we
would skip DB tests, fail instead.
Set it to "true" in all.bash.
Fixes golang/go#39713.
Change-Id: I80fe27578a05610e29cc3ad9f6d477c9768fd51a
Reviewed-on: https://go-review.googlesource.com/c/pkgsite/+/239257
Reviewed-by: Julie Qiu <julie@golang.org>
Diffstat (limited to 'internal/database/database_test.go')
| -rw-r--r-- | internal/database/database_test.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/database/database_test.go b/internal/database/database_test.go index 3e11f6e3..68a9090b 100644 --- a/internal/database/database_test.go +++ b/internal/database/database_test.go @@ -29,7 +29,7 @@ func TestMain(m *testing.M) { const dbName = "discovery_postgres_test" if err := dbtest.CreateDBIfNotExists(dbName); err != nil { - if errors.Is(err, derrors.NotFound) { + if errors.Is(err, derrors.NotFound) && os.Getenv("GO_DISCOVERY_TESTDB") != "true" { log.Printf("SKIPPING: could not connect to DB (see doc/postgres.md to set up): %v", err) return } |
