fix(tests): update database connection strings for CI
Integration Tests / integration-test (push) Failing after 57s
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:
@@ -3,6 +3,7 @@ package integration
|
||||
import (
|
||||
"context"
|
||||
"database/sql"
|
||||
"fmt"
|
||||
"testing"
|
||||
|
||||
_ "github.com/lib/pq"
|
||||
@@ -47,7 +48,7 @@ func TestRLSTenantIsolation(t *testing.T) {
|
||||
}
|
||||
|
||||
runtimeDB, err := sql.Open("postgres",
|
||||
"user=test_broker_runtime password=test-pass dbname=broker_test host=127.0.0.1 port=5433 sslmode=disable options='-c search_path=broker,public'")
|
||||
fmt.Sprintf("user=test_broker_runtime password=test-pass dbname=broker_test host=%s port=%d sslmode=disable options='-c search_path=broker,public'", testDBHost(), testDBPort()))
|
||||
require.NoError(t, err)
|
||||
defer runtimeDB.Close()
|
||||
require.NoError(t, runtimeDB.Ping())
|
||||
|
||||
Reference in New Issue
Block a user