summaryrefslogtreecommitdiff
path: root/test/integration/targets/pull
diff options
context:
space:
mode:
authorMatt Clay <matt@mystile.com>2019-08-12 16:23:47 -0700
committerGitHub <noreply@github.com>2019-08-12 16:23:47 -0700
commitd36919856f0e9b09a80509b2aa6bef0eb200d309 (patch)
treebb636cc7119367e4c0746cef7d1c37411bc7ece0 /test/integration/targets/pull
parent262d2a683713db1bf506be6f0bc51caf6af77c37 (diff)
downloadansible-d36919856f0e9b09a80509b2aa6bef0eb200d309.tar.gz
Update integration tests. (#60447)
* Remove unnecessary ANSIBLE_CONFIG override. * Fix pull integration test. * Fix inventory_foreman integration test.
Diffstat (limited to 'test/integration/targets/pull')
-rwxr-xr-xtest/integration/targets/pull/runme.sh13
1 files changed, 11 insertions, 2 deletions
diff --git a/test/integration/targets/pull/runme.sh b/test/integration/targets/pull/runme.sh
index 93877b1ccb..dcadc495e8 100755
--- a/test/integration/targets/pull/runme.sh
+++ b/test/integration/targets/pull/runme.sh
@@ -11,11 +11,11 @@ repo_dir="${temp_dir}/repo"
pull_dir="${temp_dir}/pull"
temp_log="${temp_dir}/pull.log"
-ansible-playbook setup.yml
+ansible-playbook setup.yml -i ../../inventory
cleanup="$(pwd)/cleanup.yml"
-trap 'ansible-playbook "${cleanup}"' EXIT
+trap 'ansible-playbook "${cleanup}" -i ../../inventory' EXIT
cp -av "pull-integration-test" "${repo_dir}"
cd "${repo_dir}"
@@ -30,22 +30,31 @@ cd "${repo_dir}"
function pass_tests {
# test for https://github.com/ansible/ansible/issues/13688
if ! grep MAGICKEYWORD "${temp_log}"; then
+ cat "${temp_log}"
echo "Missing MAGICKEYWORD in output."
exit 1
fi
# test for https://github.com/ansible/ansible/issues/13681
if grep -E '127\.0\.0\.1.*ok' "${temp_log}"; then
+ cat "${temp_log}"
echo "Found host 127.0.0.1 in output. Only localhost should be present."
exit 1
fi
# make sure one host was run
if ! grep -E 'localhost.*ok' "${temp_log}"; then
+ cat "${temp_log}"
echo "Did not find host localhost in output."
exit 1
fi
}
+export ANSIBLE_INVENTORY
+export ANSIBLE_HOST_PATTERN_MISMATCH
+
+unset ANSIBLE_INVENTORY
+unset ANSIBLE_HOST_PATTERN_MISMATCH
+
ANSIBLE_CONFIG='' ansible-pull -d "${pull_dir}" -U "${repo_dir}" "$@" | tee "${temp_log}"
pass_tests