From 36f0bf4eac5fda9e060581ff2a34c459cb7f2688 Mon Sep 17 00:00:00 2001 From: "Sven A. Schmidt" Date: Fri, 13 Dec 2024 13:24:28 +0100 Subject: [PATCH] Explicitly analyse packages and verify processing stage --- Tests/AppTests/IngestorTests.swift | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Tests/AppTests/IngestorTests.swift b/Tests/AppTests/IngestorTests.swift index c182a9981..e4871b36a 100644 --- a/Tests/AppTests/IngestorTests.swift +++ b/Tests/AppTests/IngestorTests.swift @@ -424,7 +424,7 @@ class IngestorTests: AppTestCase { try await withDependencies { $0.date.now = .now $0.environment.allowSocialPosts = { false } - } operation: { + } operation: { [db = app.db] in Current.fileManager.fileExists = { @Sendable _ in true } Current.git.commitCount = { @Sendable _ in 1 } Current.git.firstCommitDate = { @Sendable _ in .t0 } @@ -440,7 +440,10 @@ class IngestorTests: AppTestCase { return "" } - try await Analyze.analyze(client: app.client, database: app.db, mode: .limit(10)) + try await Analyze.analyze(client: app.client, database: db, mode: .id(.id0)) + try await Analyze.analyze(client: app.client, database: db, mode: .id(.id1)) + try await XCTAssertEqualAsync(try await Package.find(.id0, on: db)?.processingStage, .analysis) + try await XCTAssertEqualAsync(try await Package.find(.id1, on: db)?.processingStage, .analysis) } }