fix(tests): update database connection strings for CI
Integration Tests / integration-test (push) Failing after 57s

* Use dynamic host and port for Postgres in tests
* Add helper functions for test database host and port
This commit is contained in:
2026-09-18 21:07:28 +02:00
parent 21ce966d82
commit 63a7494982
7 changed files with 71 additions and 21 deletions
+2 -1
View File
@@ -2,6 +2,7 @@ package integration
import (
"database/sql"
"fmt"
"testing"
"time"
@@ -10,7 +11,7 @@ import (
)
func TestConnection(t *testing.T) {
connStr := "user=user password=password dbname=broker_test host=127.0.0.1 port=5433 sslmode=disable"
connStr := fmt.Sprintf("user=user password=password dbname=broker_test host=%s port=%d sslmode=disable", testDBHost(), testDBPort())
var db *sql.DB
var err error