Moved the PostgreSQL TLS context building to the Service initialiser in the Persistence package.

This commit is contained in:
2026-08-05 01:36:19 +02:00
parent e51f09c66f
commit 0796aa314e
5 changed files with 50 additions and 29 deletions
@@ -35,11 +35,11 @@ struct HealthControllerTests {
@Test
func `serves ready at the readiness path when the database is reachable`() async throws {
let service = Service(
let service = try Service(
driver: .inMemory,
logger: Logger(label: "test")
)
let fluent = try service()
let fluent = service()
do {
try await app(
@@ -69,7 +69,7 @@ struct HealthControllerTests {
func `serves unavailable at the readiness path when the database is unreachable`() async throws {
// Port 1 on the loopback interface has nothing listening, so the probe's connection is refused
// immediately instead of timing out.
let service = Service(
let service = try Service(
driver: .postgres(
.init(
host: "127.0.0.1",
@@ -83,7 +83,7 @@ struct HealthControllerTests {
),
logger: Logger(label: "test")
)
let fluent = try service()
let fluent = service()
do {
try await app(