From 0742308d1020d8cbecf4bba35314be7c998f774d Mon Sep 17 00:00:00 2001 From: Graham McIntire Date: Mon, 27 Jul 2026 13:19:59 -0500 Subject: [PATCH] fix: read PGHOST env var in test config for CI postgres hostname CI sets PGHOST=postgres for the Docker service network, but test.exs hardcoded hostname to localhost, causing connection refused errors. --- config/test.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/test.exs b/config/test.exs index 82b36fe..841cdb5 100644 --- a/config/test.exs +++ b/config/test.exs @@ -22,7 +22,7 @@ config :aprsme, Aprsme.PromEx, disabled: true config :aprsme, Aprsme.Repo, username: "postgres", password: "postgres", - hostname: "localhost", + hostname: System.get_env("PGHOST", "localhost"), database: "aprsme_test#{System.get_env("MIX_TEST_PARTITION")}", pool: Ecto.Adapters.SQL.Sandbox, pool_size: pool_size,