summaryrefslogtreecommitdiff
path: root/test/integration/targets/collections/runme.sh
diff options
context:
space:
mode:
authorSloane Hertel <19572925+s-hertel@users.noreply.github.com>2022-03-15 14:11:12 -0400
committerGitHub <noreply@github.com>2022-03-15 11:11:12 -0700
commit939f8430241a9bafd1fd903ce865b0d422b2218b (patch)
tree1376f4441b7136c41d2ac186291824ef1f4a358c /test/integration/targets/collections/runme.sh
parentca8835c99029e6cbbb64a5510e6b03a943ba1697 (diff)
downloadansible-939f8430241a9bafd1fd903ce865b0d422b2218b.tar.gz
[2.11] Fix collection redirects for filter and test plugins (#77210) (#77228)
* Fix collection redirects for filter and test plugins (#77210) * Fix collection redirects for jinja2 filters/tests * Handle recursive redirects Co-authored-by: Matt Martz <matt@sivel.net> (cherry picked from commit 8063643b4cec51a72377da5f3fa354d3ff9e737a) * The error message is only capitalized on 2.13. Make test more flexible. (cherry picked from commit 734777ef05b8c200f45336a8b9b41f9f9af597c1)
Diffstat (limited to 'test/integration/targets/collections/runme.sh')
-rwxr-xr-xtest/integration/targets/collections/runme.sh10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/integration/targets/collections/runme.sh b/test/integration/targets/collections/runme.sh
index 663b3e1cd7..f7f5aba30c 100755
--- a/test/integration/targets/collections/runme.sh
+++ b/test/integration/targets/collections/runme.sh
@@ -69,6 +69,16 @@ else
ansible-playbook -i "${INVENTORY_PATH}" collection_root_user/ansible_collections/testns/testcoll/playbooks/default_collection_playbook.yml "$@"
fi
+# test redirects and warnings for filter redirects
+echo "testing redirect and deprecation display"
+ANSIBLE_DEPRECATION_WARNINGS=yes ansible localhost -m debug -a msg='{{ "data" | testns.testredirect.multi_redirect_filter }}' -vvvvv 2>&1 | tee out.txt
+cat out.txt
+
+test "$(grep out.txt -ce 'deprecation1' -ce 'deprecation2' -ce 'deprecation3')" == 3
+grep out.txt -e 'redirecting (type: filter) testns.testredirect.multi_redirect_filter to testns.testredirect.redirect_filter1'
+grep out.txt -e 'redirecting (type: filter) testns.testredirect.redirect_filter1 to testns.testredirect.redirect_filter2'
+grep out.txt -e 'redirecting (type: filter) testns.testredirect.redirect_filter2 to testns.testcoll.testfilter'
+
echo "--- validating collections support in playbooks/roles"
# run test playbooks
ansible-playbook -i "${INVENTORY_PATH}" -v "${TEST_PLAYBOOK}" "$@"