mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-10-22 03:53:59 -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
|
@ -136,7 +136,8 @@
|
|||
assert:
|
||||
that:
|
||||
- eval_error is failed
|
||||
- eval_error.msg.startswith("Caught \"'foo' is undefined")
|
||||
- >-
|
||||
"Caught \"'foo' is undefined" in eval_error.msg
|
||||
|
||||
- name: "Test 5: same variable name reused"
|
||||
debug:
|
||||
|
@ -151,7 +152,8 @@
|
|||
assert:
|
||||
that:
|
||||
- eval_error is failed
|
||||
- eval_error.msg.startswith("Caught \"'x' is undefined")
|
||||
- >-
|
||||
"Caught \"'x' is undefined" in eval_error.msg
|
||||
|
||||
- name: "Test 6: multi-value dict"
|
||||
debug:
|
||||
|
@ -166,7 +168,8 @@
|
|||
assert:
|
||||
that:
|
||||
- eval_error is failed
|
||||
- eval_error.msg == 'Parameter 0 must be a one-element dictionary, got 2 elements'
|
||||
- >-
|
||||
'Parameter 0 must be a one-element dictionary, got 2 elements' in eval_error.msg
|
||||
|
||||
- name: "Test 7: empty dict"
|
||||
debug:
|
||||
|
@ -180,4 +183,5 @@
|
|||
assert:
|
||||
that:
|
||||
- eval_error is failed
|
||||
- eval_error.msg == 'Parameter 0 must be a one-element dictionary, got 0 elements'
|
||||
- >-
|
||||
'Parameter 0 must be a one-element dictionary, got 0 elements' in eval_error.msg
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue