From dd9da9452b0c4a8353bd0fe2c2590da1fc52d059 Mon Sep 17 00:00:00 2001 From: Andrew Woodlee Date: Tue, 15 Jul 2025 20:23:58 -0500 Subject: [PATCH] CLI: Exec subcommand `host` --- cmd/exec.go | 2 +- tests/ErrorHook.yml | 1 - tests/docker/buildDocker.sh | 1 + tests/hosts.yml | 2 +- tests/packageCommands.yml | 8 ++++++++ 5 files changed, 11 insertions(+), 3 deletions(-) diff --git a/cmd/exec.go b/cmd/exec.go index 60e1b47..7967926 100644 --- a/cmd/exec.go +++ b/cmd/exec.go @@ -21,7 +21,7 @@ var ( ) func init() { - execCmd.AddCommand(hostExecCommand) + execCmd.AddCommand(hostExecCommand, hostsExecCommand) } diff --git a/tests/ErrorHook.yml b/tests/ErrorHook.yml index 14e353d..eb34d93 100644 --- a/tests/ErrorHook.yml +++ b/tests/ErrorHook.yml @@ -22,7 +22,6 @@ commands: outputToLog: true Args: - "-v" - host: email-svr cmdLists: TestHooks: diff --git a/tests/docker/buildDocker.sh b/tests/docker/buildDocker.sh index dc534f8..8bba2bd 100755 --- a/tests/docker/buildDocker.sh +++ b/tests/docker/buildDocker.sh @@ -1,3 +1,4 @@ +cd ~/Projects/backy/tests/docker docker container rm -f ssh_server_container docker build -t ssh_server_image . docker run -d -p 2222:22 --name ssh_server_container ssh_server_image \ No newline at end of file diff --git a/tests/hosts.yml b/tests/hosts.yml index 03bdbad..bfe973e 100644 --- a/tests/hosts.yml +++ b/tests/hosts.yml @@ -2,5 +2,5 @@ hosts: docker: port: 2222 Hostname: localhost - user: backy + user: root IdentityFile: ./docker/backytest \ No newline at end of file diff --git a/tests/packageCommands.yml b/tests/packageCommands.yml index f5f3193..b4518bf 100644 --- a/tests/packageCommands.yml +++ b/tests/packageCommands.yml @@ -38,6 +38,14 @@ commands: packageManager: apt packageOperation: checkVersion + installJq: + type: package + shell: bash + packages: + - name: "jq" + packageManager: apt + packageOperation: install + checkDockerVersionWithInvalidRegex: type: package shell: zsh