Skip to content

Commit 1f7b33e

Browse files
committed
Convert AnalyzerTests
1 parent ae9978d commit 1f7b33e

File tree

11 files changed

+1145
-1100
lines changed

11 files changed

+1145
-1100
lines changed

Tests/AppTests/AnalyzeErrorTests.swift

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ import Vapor
5858
}
5959

6060
@Test func analyze_refreshCheckout_failed() async throws {
61-
try await withApp(setup, defaultDependencies, capturingLogger) { app in
61+
try await withApp(setup, defaultDependencies, logHandler: capturingLogger) { app in
6262
try await withDependencies {
6363
$0.environment.loadSPIManifest = { _ in nil }
6464
$0.fileManager.fileExists = { @Sendable _ in true }
@@ -90,7 +90,7 @@ import Vapor
9090
}
9191

9292
@Test func analyze_updateRepository_invalidPackageCachePath() async throws {
93-
try await withApp(setup, defaultDependencies, capturingLogger) { app in
93+
try await withApp(setup, defaultDependencies, logHandler: capturingLogger) { app in
9494
try await withDependencies {
9595
$0.environment.loadSPIManifest = { _ in nil }
9696
$0.fileManager.fileExists = { @Sendable _ in true }
@@ -118,7 +118,7 @@ import Vapor
118118
}
119119

120120
@Test func analyze_getPackageInfo_gitCheckout_error() async throws {
121-
try await withApp(setup, defaultDependencies, capturingLogger) { app in
121+
try await withApp(setup, defaultDependencies, logHandler: capturingLogger) { app in
122122
try await withDependencies {
123123
$0.environment.loadSPIManifest = { _ in nil }
124124
$0.fileManager.fileExists = { @Sendable _ in true }
@@ -147,7 +147,7 @@ import Vapor
147147
}
148148

149149
@Test func analyze_dumpPackage_missing_manifest() async throws {
150-
try await withApp(setup, defaultDependencies, capturingLogger) { app in
150+
try await withApp(setup, defaultDependencies, logHandler: capturingLogger) { app in
151151
try await withDependencies {
152152
$0.environment.loadSPIManifest = { _ in nil }
153153
$0.fileManager.fileExists = { @Sendable path in

Tests/AppTests/AnalyzerTests.swift

Lines changed: 1140 additions & 1095 deletions
Large diffs are not rendered by default.

Tests/AppTests/Helpers/TestSupport.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import Vapor
2020

2121
func withApp(_ setup: (Application) async throws -> Void = { _ in },
2222
_ updateValuesForOperation: (inout DependencyValues) async throws -> Void = { _ in },
23-
_ logHandler: LogHandler? = nil,
23+
logHandler: LogHandler? = nil,
2424
environment: Environment = .testing,
2525
_ test: (Application) async throws -> Void) async throws {
2626
try await AppTestCase.setupDb(environment)

0 commit comments

Comments
 (0)