From 4c57e15991d342884cc902847399dcee782bc18f Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Sat, 11 Jul 2026 10:34:59 +0000 Subject: [PATCH] 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: https://repo.rock-n-code.com/rock-n-code/loud-amsterdam/pulls/15 Co-authored-by: Javier Cicchelli Co-committed-by: Javier Cicchelli --- .../Cases/Public/Methods/ServiceTests.swift | 5 +- .../xcschemes/WebsiteLibraryTests.xcscheme | 54 ------------------- Services/Website/Tests/Website.xctestplan | 14 +++++ 3 files changed, 18 insertions(+), 55 deletions(-) delete mode 100644 Services/Website/.swiftpm/xcode/xcshareddata/xcschemes/WebsiteLibraryTests.xcscheme diff --git a/Packages/Persistence/Tests/Cases/Public/Methods/ServiceTests.swift b/Packages/Persistence/Tests/Cases/Public/Methods/ServiceTests.swift index 8066f4d..0ef5fb1 100644 --- a/Packages/Persistence/Tests/Cases/Public/Methods/ServiceTests.swift +++ b/Packages/Persistence/Tests/Cases/Public/Methods/ServiceTests.swift @@ -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) diff --git a/Services/Website/.swiftpm/xcode/xcshareddata/xcschemes/WebsiteLibraryTests.xcscheme b/Services/Website/.swiftpm/xcode/xcshareddata/xcschemes/WebsiteLibraryTests.xcscheme deleted file mode 100644 index c86f644..0000000 --- a/Services/Website/.swiftpm/xcode/xcshareddata/xcschemes/WebsiteLibraryTests.xcscheme +++ /dev/null @@ -1,54 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - diff --git a/Services/Website/Tests/Website.xctestplan b/Services/Website/Tests/Website.xctestplan index 1d7b818..1711555 100644 --- a/Services/Website/Tests/Website.xctestplan +++ b/Services/Website/Tests/Website.xctestplan @@ -31,6 +31,20 @@ "identifier" : "WebsiteLibraryTests", "name" : "WebsiteLibraryTests" } + }, + { + "target" : { + "containerPath" : "container:..\/Localization", + "identifier" : "LocalizationTests", + "name" : "LocalizationTests" + } + }, + { + "target" : { + "containerPath" : "container:", + "identifier" : "PersistenceTests", + "name" : "PersistenceTests" + } } ], "version" : 1