feat: Adds file-client tests.

This commit is contained in:
2024-12-16 19:00:42 -05:00
parent 85b285347b
commit f89efc8c5e
4 changed files with 100 additions and 22 deletions

View File

@@ -14,7 +14,7 @@ struct VaultClientTests: TestCase {
func decrypt(input: TestOptions) async throws {
try await withCapturingCommandClient("decrypt") {
$0.configurationClient = .mock(input.configuration)
$0.fileClient.findVaultFileInCurrentDirectory = { URL(filePath: "/vault.yml") }
$0.fileClient.findVaultFile = { _ in URL(filePath: "/vault.yml") }
$0.vaultClient = .liveValue
} run: {
@Dependency(\.vaultClient) var vaultClient
@@ -45,7 +45,7 @@ struct VaultClientTests: TestCase {
func encrypt(input: TestOptions) async throws {
try await withCapturingCommandClient("decrypt") {
$0.configurationClient = .mock(input.configuration)
$0.fileClient.findVaultFileInCurrentDirectory = { URL(filePath: "/vault.yml") }
$0.fileClient.findVaultFile = { _ in URL(filePath: "/vault.yml") }
$0.vaultClient = .liveValue
} run: {
@Dependency(\.vaultClient) var vaultClient