Fixed test case for the Persistence package. (#15)

This PR contains the work done to amend a test case within the Persistence tests target that was failing.

Reviewed-on: rock-n-code/loud-amsterdam#15
Co-authored-by: Javier Cicchelli <javier@rock-n-code.com>
Co-committed-by: Javier Cicchelli <javier@rock-n-code.com>
This commit is contained in:
2026-07-11 10:34:59 +00:00
committed by javier
parent a0f5c79434
commit 4c57e15991
3 changed files with 18 additions and 55 deletions
@@ -112,14 +112,17 @@ private extension ServiceTests {
driver: Persistence.Driver,
revertAfter: Bool = false
) async throws {
let prepareDB = PrepareDB()
let service = Service(
driver: driver,
logger: Logger(label: "test")
)
let fluent = service()
do {
await registerMigrations(fluent)
await prepareDB(for: fluent)
try await fluent.migrate()
let repository = ExampleRepository(fluent: fluent)