Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ let package = Package(
.product(name: "DependenciesTestSupport", package: "swift-dependencies"),
.product(name: "SnapshotTesting", package: "swift-snapshot-testing"),
.product(name: "InlineSnapshotTesting", package: "swift-snapshot-testing"),
.product(name: "XCTVapor", package: "vapor"),
.product(name: "VaporTesting", package: "vapor"),
.target(name: "App"),
],
exclude: ["__Snapshots__", "Fixtures"],
Expand Down
16 changes: 8 additions & 8 deletions Tests/AppTests/API+PackageController+GetRoute+ModelTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {

@Test func init_no_packageName() async throws {
// Tests behaviour when we're lacking data
try await withApp { app in
try await withSPIApp { app in
// setup package without package name
let pkg = try await savePackage(on: app.db, "1".url)
try await Repository(package: pkg, name: "bar", owner: "foo").save(on: app.db)
Expand Down Expand Up @@ -56,7 +56,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func init_packageIdentity() async throws {
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, URL(string: "https://github.com/foo/swift-bar.git")!)
try await Repository(package: pkg, name: "bar", owner: "foo").save(on: app.db)
let version = try App.Version(package: pkg, latest: .defaultBranch, packageName: nil, reference: .branch("main"))
Expand All @@ -81,7 +81,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func init_generated_documentation() async throws {
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, "1".url)
try await Repository(package: pkg, name: "bar", owner: "foo").save(on: app.db)
let version = try App.Version(package: pkg, latest: .defaultBranch, packageName: nil, reference: .branch("main"))
Expand All @@ -107,7 +107,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func init_external_documentation() async throws {
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, "1".url)
try await Repository(package: pkg, name: "bar", owner: "foo").save(on: app.db)
let version = try App.Version(package: pkg, latest: .defaultBranch, packageName: nil, reference: .branch("main"))
Expand Down Expand Up @@ -137,7 +137,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func ForkedFromInfo_query() async throws {
try await withApp { app in
try await withSPIApp { app in
let originalPkg = try await savePackage(on: app.db, id: .id0, "https://github.com/original/original")
try await Repository(package: originalPkg,
name: "original",
Expand All @@ -159,7 +159,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {

@Test func ForkedFromInfo_query_fallback() async throws {
// when the package can't be found resort to fallback URL
try await withApp { app in
try await withSPIApp { app in
// MUT
let forkedFrom = await API.PackageController.GetRoute.Model.ForkedFromInfo.query(on: app.db, packageId: .id0, fallbackURL: "https://github.com/original/original.git")

Expand Down Expand Up @@ -544,7 +544,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func groupBuildInfo() async throws {
try await withApp { app in
try await withSPIApp { app in
let result1: BuildResults = .init(results: [.v5_8: .compatible,
.v5_9: .compatible,
.v5_10: .compatible,
Expand Down Expand Up @@ -595,7 +595,7 @@ extension AllTests.API_PackageController_GetRoute_ModelTests {
}

@Test func languagePlatformInfo() async throws {
try await withApp { app in
try await withSPIApp { app in
// setup
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
Expand Down
4 changes: 2 additions & 2 deletions Tests/AppTests/API+PackageController+GetRouteTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ extension AllTests.API_PackageController_GetRouteTests {
typealias PackageResult = PackageController.PackageResult

@Test func releaseInfo() async throws {
try await withApp { app in
try await withSPIApp { app in
// setup
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
Expand Down Expand Up @@ -70,7 +70,7 @@ extension AllTests.API_PackageController_GetRouteTests {

@Test func releaseInfo_exclude_non_latest() async throws {
// Test to ensure that we don't include versions with `latest IS NULL`
try await withApp { app in
try await withSPIApp { app in
// setup
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
Expand Down
10 changes: 5 additions & 5 deletions Tests/AppTests/API+PackageControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ extension AllTests.API_PackageControllerTests {
try await withDependencies {
$0.date.now = .december15_2020
} operation: {
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
commitCount: 1433,
Expand Down Expand Up @@ -66,7 +66,7 @@ extension AllTests.API_PackageControllerTests {
try await withDependencies {
$0.date.now = .december15_2020
} operation: {
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
commitCount: 1433,
Expand Down Expand Up @@ -137,7 +137,7 @@ extension AllTests.API_PackageControllerTests {

@Test func ProductCount_query() async throws {
// setup
try await withApp { app in
try await withSPIApp { app in
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg,
defaultBranch: "main",
Expand Down Expand Up @@ -285,7 +285,7 @@ extension AllTests.API_PackageControllerTests {

@Test func BuildInfo_query() async throws {
// setup
try await withApp { app in
try await withSPIApp { app in
do {
let pkg = try await savePackage(on: app.db, "1".url)
try await Repository(package: pkg,
Expand Down Expand Up @@ -353,7 +353,7 @@ extension AllTests.API_PackageControllerTests {

@Test func GetRoute_query() async throws {
// ensure GetRoute.query is wired up correctly (detailed tests are elsewhere)
try await withApp { app in
try await withSPIApp { app in
// setup
let pkg = try await savePackage(on: app.db, "1")
try await Repository(package: pkg, name: "bar", owner: "foo")
Expand Down
2 changes: 1 addition & 1 deletion Tests/AppTests/API_DependencyControllerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import Vapor
extension AllTests.API_DependencyControllerTests {

@Test func query() async throws {
try await withApp { app in
try await withSPIApp { app in
// setup
let pkg = try await savePackage(on: app.db, id: .id0, "http://github.com/foo/bar")
try await Repository(package: pkg,
Expand Down
8 changes: 4 additions & 4 deletions Tests/AppTests/AnalyzeErrorTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ extension AllTests.AnalyzeErrorTests {

@Test func analyze_refreshCheckout_failed() async throws {
let capturingLogger = CapturingLogger()
try await withApp(setup, defaultDependencies) { app in
try await withSPIApp(setup, defaultDependencies) { app in
try await withDependencies {
$0.environment.loadSPIManifest = { _ in nil }
$0.fileManager.fileExists = { @Sendable _ in true }
Expand Down Expand Up @@ -96,7 +96,7 @@ extension AllTests.AnalyzeErrorTests {

@Test func analyze_updateRepository_invalidPackageCachePath() async throws {
let capturingLogger = CapturingLogger()
try await withApp(setup, defaultDependencies) { app in
try await withSPIApp(setup, defaultDependencies) { app in
try await withDependencies {
$0.environment.loadSPIManifest = { _ in nil }
$0.fileManager.fileExists = { @Sendable _ in true }
Expand Down Expand Up @@ -126,7 +126,7 @@ extension AllTests.AnalyzeErrorTests {

@Test func analyze_getPackageInfo_gitCheckout_error() async throws {
let capturingLogger = CapturingLogger()
try await withApp(setup, defaultDependencies) { app in
try await withSPIApp(setup, defaultDependencies) { app in
try await withDependencies {
$0.environment.loadSPIManifest = { _ in nil }
$0.fileManager.fileExists = { @Sendable _ in true }
Expand Down Expand Up @@ -157,7 +157,7 @@ extension AllTests.AnalyzeErrorTests {

@Test func analyze_dumpPackage_missing_manifest() async throws {
let capturingLogger = CapturingLogger()
try await withApp(setup, defaultDependencies) { app in
try await withSPIApp(setup, defaultDependencies) { app in
try await withDependencies {
$0.environment.loadSPIManifest = { _ in nil }
$0.fileManager.fileExists = { @Sendable path in
Expand Down
Loading
Loading