feat: Updates to check if playbook is installed prior to running any of the commands, updates tests.

This commit is contained in:
2024-12-19 11:22:16 -05:00
parent 9ec86bc523
commit beb48f10a5
5 changed files with 39 additions and 5 deletions

View File

@@ -145,6 +145,7 @@ struct PlaybookClientTests: TestCase {
@Test
func generateTemplate() async throws {
try await withCapturingCommandClient("generateTemplate") {
$0.fileClient.isDirectory = { _ in true }
$0.configurationClient = .mock()
$0.playbookClient = .liveValue
} run: {
@@ -180,6 +181,7 @@ struct PlaybookClientTests: TestCase {
operation: @Sendable @escaping () async throws -> Void
) async rethrows {
try await withDependencies {
$0.fileClient.isDirectory = { _ in true }
$0.configurationClient = .mock(configuration)
$0.commandClient = .capturing(capturing)
$0.playbookClient = .liveValue