feat: Adds git client tests, restructures files.
This commit is contained in:
@@ -21,9 +21,11 @@ public struct Configuration: Codable, Equatable, Sendable {
|
||||
self.strategy = strategy
|
||||
}
|
||||
|
||||
public static var mock: Self {
|
||||
public static var `default`: Self { .mock(module: "<my-tool>") }
|
||||
|
||||
public static func mock(module: String = "cli-version") -> Self {
|
||||
.init(
|
||||
target: .init(module: .init("cli-version")),
|
||||
target: .init(module: .init(module)),
|
||||
strategy: .semvar(.init())
|
||||
)
|
||||
}
|
||||
|
||||
@@ -30,7 +30,7 @@ public struct ConfigurationClient: Sendable {
|
||||
guard let url = try? await find(url) else {
|
||||
throw ConfigurationClientError.configurationNotFound
|
||||
}
|
||||
return (try? await load(url)) ?? .mock
|
||||
return (try? await load(url)) ?? .default
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user