diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-28 16:04:21 +0000 |
commit | 8a754e0858d922e955e71b253c139e071ecec432 (patch) | |
tree | 527d16e74bfd1840c85efd675fdecad056c54107 /test/integration/targets/ansible-test-unsupported-directory/runme.sh | |
parent | Initial commit. (diff) | |
download | ansible-core-8a754e0858d922e955e71b253c139e071ecec432.tar.xz ansible-core-8a754e0858d922e955e71b253c139e071ecec432.zip |
Adding upstream version 2.14.3.upstream/2.14.3upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rwxr-xr-x | test/integration/targets/ansible-test-unsupported-directory/runme.sh | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-test-unsupported-directory/runme.sh b/test/integration/targets/ansible-test-unsupported-directory/runme.sh new file mode 100755 index 0000000..087177c --- /dev/null +++ b/test/integration/targets/ansible-test-unsupported-directory/runme.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +source ../collection/setup.sh + +set -eux + +cd "${WORK_DIR}" + +# some options should succeed even in an unsupported directory +ansible-test --help +ansible-test --version + +# the --help option should show the current working directory when it is unsupported +ansible-test --help 2>&1 | grep '^Current working directory: ' + +# some shell commands also work without a supported directory +ansible-test shell pwd + +if ansible-test sanity 1>stdout 2>stderr; then + echo "ansible-test did not fail" + exit 1 +fi + +grep '^Current working directory: ' stderr + +if grep raise stderr; then + echo "ansible-test failed with a traceback instead of an error message" + exit 2 +fi |