Moved the PostgreSQL TLS context building to the Service initialiser in the Persistence package.
This commit is contained in:
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user