mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-28 07:31:23 -07:00
[PR #9859/eff25c8a backport][stable-10] Fix/improve tests (#9860)
Fix/improve tests (#9859)
* Fix tests.
* Improve callback tests.
(cherry picked from commit eff25c8a6e
)
Co-authored-by: Felix Fontein <felix@fontein.de>
This commit is contained in:
parent
5f1f76b8f4
commit
8253fb171d
28 changed files with 187 additions and 157 deletions
|
@ -469,8 +469,10 @@
|
|||
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("changed") | list | count) == 0'
|
||||
# Invalid strings should always fail
|
||||
- '(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'
|
||||
# Invalid strings should not cause a module crash
|
||||
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("module_stdout", "defined") | list | count) == 0'
|
||||
# Invalid strings should have a proper msg field
|
||||
- '(pkgng_example8_invalid_annotation_failure.results | selectattr("msg", "match", "failed to annotate zsh, invalid annotate string: .*") | list | count) == 4'
|
||||
# Verify annotations are unaffected
|
||||
- '(pkgng_example8_invalid_annotation_verify.stdout_lines | select("search", "(naked_string|invalid_operation|empty_first_tag|validsecond|notag)") | list | count) == 0'
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue