diff --git a/.circleci/config.yml b/.circleci/config.yml index 4ef24bd9da6..4725be11f8b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,6 +418,7 @@ jobs: DB_PORT_TEST: 5433 DB_PORT: 5432 DB_NAME: test_db + DB_NAME_TEST: test_db EIA_KEY: db2522a43820268a41a802a16ae9fd26 # dummy key generated with openssl rand -hex 16 ENV: test ENVIRONMENT: test diff --git a/Makefile b/Makefile index 03219d52e7e..0d041c0a489 100644 --- a/Makefile +++ b/Makefile @@ -394,11 +394,11 @@ server_test_standalone: ## Run server unit tests with no deps # Pass `-short` to exclude long running tests # Disable test caching with `-count 1` - caching was masking local test failures ifndef CIRCLECI - DB_PORT=$(DB_PORT_TEST) go test -count 1 -short $$(go list ./... | grep -v \\/pkg\\/gen\\/ | grep -v \\/cmd\\/ | grep -v mocks) + DB_NAME=$(DB_NAME_TEST) DB_PORT=$(DB_PORT_TEST) go test -count 1 -short $$(go list ./... | grep -v \\/pkg\\/gen\\/ | grep -v \\/cmd\\/ | grep -v mocks) else # Limit the maximum number of tests to run in parallel to 8 for CircleCI due to memory constraints. # Add verbose (-v) so go-junit-report can parse it for CircleCI results - DB_PORT=$(DB_PORT_TEST) go test -v -parallel 8 -count 1 -short $$(go list ./... | grep -v \\/pkg\\/gen\\/ | grep -v \\/cmd\\/ | grep -v mocks) + DB_NAME=$(DB_NAME_TEST) DB_PORT=$(DB_PORT_TEST) go test -v -parallel 8 -count 1 -short $$(go list ./... | grep -v \\/pkg\\/gen\\/ | grep -v \\/cmd\\/ | grep -v mocks) endif server_test_build: diff --git a/pkg/testingsuite/pop_suite.go b/pkg/testingsuite/pop_suite.go index 92602ea8a2b..f698eb5409c 100644 --- a/pkg/testingsuite/pop_suite.go +++ b/pkg/testingsuite/pop_suite.go @@ -105,7 +105,7 @@ func NewPopTestSuite(packageName PackageName) PopTestSuite { } dbDialect := "postgres" - dbNameTest := envy.MustGet("DB_NAME_TEST") + dbNameTest := envy.MustGet("DB_NAME") dbHost := envy.MustGet("DB_HOST") dbPort := envy.MustGet("DB_PORT_TEST") dbUser := envy.MustGet("DB_USER")