1
0
Fork 0
mirror of https://github.com/ansible-collections/community.general.git synced 2024-09-14 20:13:21 +02:00

pkgng: Ansible 2.9 has no "false" Jinja2 test

Apparently Ansible 2.9 doesn't have the "false" test
in Jinja2 contexts. Switching to use `rejectattr(...)`
instead of `selectattr(..., "false")`.
This commit is contained in:
Ross Williams 2021-10-13 12:23:46 +00:00
parent 10a4f5ffcc
commit a52f4bb4a4

View file

@ -471,7 +471,7 @@
# Invalid strings should not change anything
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("changed") | list | count) == 0'
# Invalid strings should always fail
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("failed", "false") | list | count) == 0'
- '(pkgng_example8_invalid_annotation_failure.results | rejectattr("failed") | list | count) == 0'
# Invalid strings should not cause an exception
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("exception", "defined") | list | count) == 0'
# Verify annotations are unaffected