feat: Adds vault client
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import CodersClient
|
||||
@_spi(Internal) import CommandClient
|
||||
import ConfigurationClient
|
||||
@_spi(Internal) import ConfigurationClient
|
||||
import Dependencies
|
||||
import FileClient
|
||||
import Foundation
|
||||
@@ -12,12 +12,6 @@ import TestSupport
|
||||
@Suite("PlaybookClientTests")
|
||||
struct PlaybookClientTests: TestCase {
|
||||
|
||||
static let loggingOptions: LoggingOptions = {
|
||||
let levelString = ProcessInfo.processInfo.environment["LOG_LEVEL"] ?? "debug"
|
||||
let logLevel = Logger.Level(rawValue: levelString) ?? .debug
|
||||
return .init(commandName: "PlaybookClientTests", logLevel: logLevel)
|
||||
}()
|
||||
|
||||
static var sharedRunOptions: PlaybookClient.RunPlaybook.SharedRunOptions {
|
||||
.init(loggingOptions: loggingOptions)
|
||||
}
|
||||
@@ -268,15 +262,6 @@ extension Result where Failure == TestError {
|
||||
static var failing: Self { .failure(TestError()) }
|
||||
}
|
||||
|
||||
extension ConfigurationClient {
|
||||
static func mock(_ configuration: Configuration) -> Self {
|
||||
var mock = Self.testValue
|
||||
mock.find = { throw TestError() }
|
||||
mock.load = { _ in configuration }
|
||||
return mock
|
||||
}
|
||||
}
|
||||
|
||||
struct TestError: Error {}
|
||||
|
||||
extension Tag {
|
||||
|
||||
Reference in New Issue
Block a user