summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ansible-test-unsupported-directory
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/ansible-test-unsupported-directory')
-rw-r--r--test/integration/targets/ansible-test-unsupported-directory/aliases4
-rw-r--r--test/integration/targets/ansible-test-unsupported-directory/ansible_collections/ns/col/.keep0
-rwxr-xr-xtest/integration/targets/ansible-test-unsupported-directory/runme.sh29
3 files changed, 33 insertions, 0 deletions
diff --git a/test/integration/targets/ansible-test-unsupported-directory/aliases b/test/integration/targets/ansible-test-unsupported-directory/aliases
new file mode 100644
index 0000000..7741d44
--- /dev/null
+++ b/test/integration/targets/ansible-test-unsupported-directory/aliases
@@ -0,0 +1,4 @@
+shippable/posix/group3 # runs in the distro test containers
+shippable/generic/group1 # runs in the default test container
+context/controller
+needs/target/collection
diff --git a/test/integration/targets/ansible-test-unsupported-directory/ansible_collections/ns/col/.keep b/test/integration/targets/ansible-test-unsupported-directory/ansible_collections/ns/col/.keep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/integration/targets/ansible-test-unsupported-directory/ansible_collections/ns/col/.keep
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