feat: Begins adding docker containers

This commit is contained in:
2024-12-17 10:15:07 -05:00
parent 99459a0a71
commit f7f168b7fd
10 changed files with 114 additions and 27 deletions

View File

@@ -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",