feat: Begins adding docker containers
This commit is contained in:
@@ -18,6 +18,7 @@ struct ConfigurationClientTests: TestCase {
|
||||
@Test(arguments: ["config.toml", "config.json"])
|
||||
func generateConfigFile(fileName: String) async throws {
|
||||
try await withTestLogger(key: "generateConfigFile") {
|
||||
$0.coders = .liveValue
|
||||
$0.fileClient = .liveValue
|
||||
} operation: {
|
||||
@Dependency(\.logger) var logger
|
||||
@@ -53,6 +54,7 @@ struct ConfigurationClientTests: TestCase {
|
||||
@Test(arguments: ["config.toml", "config.json", nil])
|
||||
func loadConfigFile(fileName: String?) async throws {
|
||||
try await withTestLogger(key: "generateConfigFile") {
|
||||
$0.coders = .liveValue
|
||||
$0.fileClient = .liveValue
|
||||
} operation: {
|
||||
@Dependency(\.logger) var logger
|
||||
|
||||
@@ -23,7 +23,7 @@ struct FileClientTests {
|
||||
let fileClient = FileClient.liveValue
|
||||
|
||||
let vaultFilePath = url.appending(path: fileName)
|
||||
try FileManager.default.createFile(atPath: vaultFilePath.cleanFilePath, contents: nil)
|
||||
FileManager.default.createFile(atPath: vaultFilePath.cleanFilePath, contents: nil)
|
||||
let output = try await fileClient.findVaultFile(url)!
|
||||
|
||||
#expect(output.cleanFilePath == vaultFilePath.cleanFilePath)
|
||||
@@ -43,7 +43,7 @@ struct FileClientTests {
|
||||
try await fileClient.createDirectory(subDir)
|
||||
|
||||
let vaultFilePath = subDir.appending(path: fileName)
|
||||
try FileManager.default.createFile(atPath: vaultFilePath.cleanFilePath, contents: nil)
|
||||
FileManager.default.createFile(atPath: vaultFilePath.cleanFilePath, contents: nil)
|
||||
let output = try await fileClient.findVaultFile(url)!
|
||||
|
||||
#expect(output.cleanFilePath == vaultFilePath.cleanFilePath)
|
||||
|
||||
@@ -22,12 +22,14 @@ struct PlaybookClientTests: TestCase {
|
||||
|
||||
@Test(.tags(.repository))
|
||||
func repositoryInstallation() async throws {
|
||||
try await withDependencies {
|
||||
try await withTestLogger(key: "repositoryInstallation") {
|
||||
$0.fileClient = .liveValue
|
||||
$0.asyncShellClient = .liveValue
|
||||
$0.commandClient = .liveValue
|
||||
} operation: {
|
||||
try await withTemporaryDirectory { tempDirectory in
|
||||
@Dependency(\.fileClient) var fileClient
|
||||
@Dependency(\.logger) var logger
|
||||
let pathUrl = tempDirectory.appending(path: "playbook")
|
||||
let playbookClient = PlaybookClient.liveValue
|
||||
|
||||
@@ -35,7 +37,8 @@ struct PlaybookClientTests: TestCase {
|
||||
|
||||
try? FileManager.default.removeItem(at: pathUrl)
|
||||
try await playbookClient.repository.install(configuration)
|
||||
let exists = FileManager.default.fileExists(atPath: pathUrl.cleanFilePath)
|
||||
logger.debug("Done cloning playbook")
|
||||
let exists = try await fileClient.isDirectory(pathUrl)
|
||||
#expect(exists)
|
||||
}
|
||||
}
|
||||
@@ -61,8 +64,6 @@ struct PlaybookClientTests: TestCase {
|
||||
try await withMockConfiguration(captured, key: "runBuildProject") {
|
||||
@Dependency(\.playbookClient) var playbookClient
|
||||
|
||||
let configuration = Configuration.mock
|
||||
|
||||
try await playbookClient.run.buildProject(.init(projectDirectory: "/foo", shared: Self.sharedRunOptions))
|
||||
|
||||
let arguments = await captured.options!.arguments
|
||||
@@ -92,8 +93,6 @@ struct PlaybookClientTests: TestCase {
|
||||
@Dependency(\.logger) var logger
|
||||
@Dependency(\.playbookClient) var playbookClient
|
||||
|
||||
let configuration = Configuration.mock
|
||||
|
||||
try await playbookClient.run.createProject(
|
||||
.init(
|
||||
projectDirectory: "/project",
|
||||
|
||||
Reference in New Issue
Block a user