diff options
author | Matt Clay <matt@mystile.com> | 2022-12-05 12:16:24 -0800 |
---|---|---|
committer | Matt Clay <matt@mystile.com> | 2022-12-05 13:51:26 -0800 |
commit | f240f69508ebcba27bf6a51e4d6c81b9894900e8 (patch) | |
tree | a6177d45ca7c5d726831a5c37200a1bddcf958b5 | |
parent | 3bcb4f267dd078a78a13e36859d5dd4748bed2fe (diff) | |
download | ansible-f240f69508ebcba27bf6a51e4d6c81b9894900e8.tar.gz |
[stable-2.14] Handle line wraps in jinja_plugins test.
(cherry picked from commit 31f95e201a564faef77473a7762a7d99583a9712)
Co-authored-by: Matt Clay <matt@mystile.com>
-rw-r--r-- | test/integration/targets/jinja_plugins/tasks/main.yml | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/integration/targets/jinja_plugins/tasks/main.yml b/test/integration/targets/jinja_plugins/tasks/main.yml index 9bc198ba85..d3d6e2e82d 100644 --- a/test/integration/targets/jinja_plugins/tasks/main.yml +++ b/test/integration/targets/jinja_plugins/tasks/main.yml @@ -10,10 +10,14 @@ - debug: var: result +- set_fact: + # NOTE: This will cram words together that were manually wrapped, which should be OK for this test. + stderr: "{{ result.stderr | replace('\n', '') }}" + - assert: that: - - '"[WARNING]: Skipping filter plugin" in result.stderr' - - '"[WARNING]: Skipping test plugin" in result.stderr' - - result.stderr|regex_findall('bad_collection_filter')|length == 3 - - result.stderr|regex_findall('bad_collection_filter2')|length == 1 - - result.stderr|regex_findall('bad_collection_test')|length == 2 + - '"[WARNING]: Skipping filter plugin" in stderr' + - '"[WARNING]: Skipping test plugin" in stderr' + - stderr|regex_findall('bad_collection_filter')|length == 3 + - stderr|regex_findall('bad_collection_filter2')|length == 1 + - stderr|regex_findall('bad_collection_test')|length == 2 |