ci: stop overriding POSTGRES_HOST in test helpers
Backend Tests / test (push) Failing after 50s

This commit is contained in:
2026-06-25 01:01:32 +01:00
parent a11d2538e9
commit 99a06048c8
2 changed files with 5 additions and 15 deletions
+3 -7
View File
@@ -12,15 +12,11 @@ import (
)
func resetEnv() {
host := "localhost"
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")
os.Setenv("POSTGRES_PASSWORD", "mypassword")
os.Setenv("POSTGRES_HOST", host)
if os.Getenv("POSTGRES_HOST") == "" {
os.Setenv("POSTGRES_HOST", "localhost")
}
os.Setenv("POSTGRES_DB", "crussell_test_db")
}
+2 -8
View File
@@ -11,14 +11,8 @@ import (
func init() {
// Set defaults for test environment if not already set
host := os.Getenv("POSTGRES_HOST")
if host == "" {
if h := os.Getenv("TEST_DB_HOST"); h != "" {
host = h
} else {
host = "localhost"
}
os.Setenv("POSTGRES_HOST", host)
if os.Getenv("POSTGRES_HOST") == "" {
os.Setenv("POSTGRES_HOST", "localhost")
}
if os.Getenv("POSTGRES_USER") == "" {
os.Setenv("POSTGRES_USER", "myuser")