This commit is contained in:
@@ -62,7 +62,7 @@ jobs:
|
||||
working-directory: backend
|
||||
run: go test -tags "test,dev" -count=1 -v -timeout 120s ./handlers/... ./auth/... ./mw/... ./internal/... ./db/...
|
||||
env:
|
||||
TEST_DB_HOST: postgres
|
||||
POSTGRES_HOST: postgres
|
||||
PGUSER: myuser
|
||||
PGPASSWORD: mypassword
|
||||
PGDATABASE: mydb
|
||||
|
||||
@@ -13,7 +13,9 @@ import (
|
||||
|
||||
func resetEnv() {
|
||||
host := "localhost"
|
||||
if h := os.Getenv("TEST_DB_HOST"); h != "" {
|
||||
if h := os.Getenv("POSTGRES_HOST"); h != "" {
|
||||
host = h
|
||||
} else if h := os.Getenv("TEST_DB_HOST"); h != "" {
|
||||
host = h
|
||||
}
|
||||
os.Setenv("POSTGRES_USER", "myuser")
|
||||
|
||||
Reference in New Issue
Block a user