Skip to content

Commit 04ef182

Browse files
committed
Explicitly analyse packages and verify processing stage
1 parent b2c2ae5 commit 04ef182

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Tests/AppTests/IngestorTests.swift

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ class IngestorTests: AppTestCase {
424424
try await withDependencies {
425425
$0.date.now = .now
426426
$0.environment.allowSocialPosts = { false }
427-
} operation: {
427+
} operation: { [db = app.db] in
428428
Current.fileManager.fileExists = { @Sendable _ in true }
429429
Current.git.commitCount = { @Sendable _ in 1 }
430430
Current.git.firstCommitDate = { @Sendable _ in .t0 }
@@ -440,7 +440,10 @@ class IngestorTests: AppTestCase {
440440
return ""
441441
}
442442

443-
try await Analyze.analyze(client: app.client, database: app.db, mode: .limit(10))
443+
try await Analyze.analyze(client: app.client, database: db, mode: .id(.id0))
444+
try await Analyze.analyze(client: app.client, database: db, mode: .id(.id1))
445+
try await XCTAssertEqualAsync(try await Package.find(.id0, on: db)?.processingStage, .analysis)
446+
try await XCTAssertEqualAsync(try await Package.find(.id1, on: db)?.processingStage, .analysis)
444447
}
445448
}
446449

0 commit comments

Comments
 (0)