Use testcontainers host for Postgres tests
Deploy / deploy (push) Successful in 1m30s
CI / Rust Checks (push) Successful in 6m7s
CI / UI Checks (push) Successful in 5s
CI / Deployment Manifests (push) Successful in 3s
CI / Frontend E2E (push) Successful in 4m32s

This commit is contained in:
github-ops
2026-06-21 10:35:54 +00:00
parent 9705c5d8cf
commit cab9282c50
+4 -1
View File
@@ -90,13 +90,16 @@ fn start_postgres() -> TestPostgres {
.start()
.expect("test PostgreSQL container must start");
register_container_cleanup(container.id().to_owned());
let host = container
.get_host()
.expect("test PostgreSQL host must be resolved");
let port = container
.get_host_port_ipv4(5432)
.expect("test PostgreSQL port must be mapped");
TestPostgres {
_container: container,
database_url: format!("postgres://crank:crank@127.0.0.1:{port}/crank"),
database_url: format!("postgres://crank:crank@{host}:{port}/crank"),
}
}