File tree Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Expand file tree Collapse file tree 4 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -58,6 +58,8 @@ final class MastodonTests: AppTestCase {
5858
5959 try await withDependencies {
6060 $0. date. now = . now
61+ $0. packageListRepository. fetchCustomCollections = { @Sendable _ in [ ] }
62+ $0. packageListRepository. fetchCustomCollection = { @Sendable _, _ in [ ] }
6163 } operation: {
6264 // run first two processing steps
6365 try await reconcile ( client: app. client, database: app. db)
Original file line number Diff line number Diff line change 1414
1515@testable import App
1616
17+ import Dependencies
1718import Prometheus
1819import XCTest
1920
@@ -98,14 +99,18 @@ class MetricsTests: AppTestCase {
9899 }
99100
100101 func test_reconcileDurationSeconds( ) async throws {
101- // setup
102- Current . fetchPackageList = { _ in [ " 1 " , " 2 " , " 3 " ] . asURLs }
102+ try await withDependencies {
103+ $0. packageListRepository. fetchCustomCollections = { @Sendable _ in [ ] }
104+ } operation: {
105+ // setup
106+ Current . fetchPackageList = { _ in [ " 1 " , " 2 " , " 3 " ] . asURLs }
103107
104- // MUT
105- try await reconcile ( client: app. client, database: app. db)
108+ // MUT
109+ try await reconcile ( client: app. client, database: app. db)
106110
107- // validation
108- XCTAssert ( ( AppMetrics . reconcileDurationSeconds? . get ( ) ) ?? 0 > 0 )
111+ // validation
112+ XCTAssert ( ( AppMetrics . reconcileDurationSeconds? . get ( ) ) ?? 0 > 0 )
113+ }
109114 }
110115
111116 func test_ingestDurationSeconds( ) async throws {
Original file line number Diff line number Diff line change @@ -297,6 +297,7 @@ final class PackageTests: AppTestCase {
297297 func test_isNew( ) async throws {
298298 try await withDependencies {
299299 $0. date. now = . now
300+ $0. packageListRepository. fetchCustomCollections = { @Sendable _ in [ ] }
300301 } operation: {
301302 // setup
302303 let url = " 1 " . asGithubUrl
Original file line number Diff line number Diff line change @@ -160,6 +160,8 @@ class PipelineTests: AppTestCase {
160160 func test_processing_pipeline( ) async throws {
161161 try await withDependencies {
162162 $0. date. now = . now
163+ $0. packageListRepository. fetchCustomCollections = { @Sendable _ in [ ] }
164+ $0. packageListRepository. fetchCustomCollection = { @Sendable _, _ in [ ] }
163165 } operation: {
164166 // Test pipeline pick-up end to end
165167 // setup
You can’t perform that action at this time.
0 commit comments