summaryrefslogtreecommitdiffstats
path: root/test/integration/targets/ignore_unreachable/runme.sh
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/ignore_unreachable/runme.sh')
-rwxr-xr-xtest/integration/targets/ignore_unreachable/runme.sh8
1 files changed, 8 insertions, 0 deletions
diff --git a/test/integration/targets/ignore_unreachable/runme.sh b/test/integration/targets/ignore_unreachable/runme.sh
index ff0ab736a0..f05dfdc110 100755
--- a/test/integration/targets/ignore_unreachable/runme.sh
+++ b/test/integration/targets/ignore_unreachable/runme.sh
@@ -1,6 +1,8 @@
#!/usr/bin/env bash
set -eux
+export ANSIBLE_TIMEOUT=1
+
export ANSIBLE_CONNECTION_PLUGINS=./fake_connectors
# use fake connectors that raise errors at different stages
ansible-playbook test_with_bad_plugins.yml -i inventory -v "$@"
@@ -14,3 +16,9 @@ if ansible-playbook test_base_cannot_connect.yml -i inventory -v "$@"; then
else
echo "Connection to nonexistent hosts failed without using ignore_unreachable. Success!"
fi
+
+if ansible-playbook test_base_loop_cannot_connect.yml -i inventory -v "$@" > out.txt; then
+ echo "Playbook intended to fail succeeded. Connection succeeded to nonexistent host"
+ exit 1
+fi
+grep out.txt -e 'ignored=1' | grep 'unreachable=2' | grep 'ok=1'