fix: Fixes failing tests since we create backups now during configuration generation.
All checks were successful
CI / Run Tests (push) Successful in 2m43s
CI / Run Tests (pull_request) Successful in 2m22s

This commit is contained in:
2024-12-17 15:44:51 -05:00
parent 0b153d7990
commit fb246df01a
2 changed files with 2 additions and 14 deletions

View File

@@ -35,18 +35,6 @@ struct ConfigurationClientTests: TestCase {
#expect(FileManager.default.fileExists(atPath: tempFile.cleanFilePath))
#expect(fileClient.fileExists(tempFile))
#expect(output == tempFile.cleanFilePath)
// Ensure that we do not overwrite files if they exist.
do {
_ = try await configuration.generate(.init(
force: false,
json: fileName.hasSuffix("json"),
path: .file(File(tempFile)!)
))
#expect(Bool(false))
} catch {
#expect(Bool(true))
}
}
}
}
@@ -152,7 +140,7 @@ struct ConfigurationClientTests: TestCase {
try await withGeneratedConfigFile(named: "config.toml", client: client) { configFile in
@Dependency(\.fileClient) var fileClient
let backupUrl = configFile.url.appendingPathExtension(".back")
let backupUrl = configFile.url.appendingPathExtension("back")
#expect(fileClient.fileExists(backupUrl) == false)
let config = Configuration()