mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
af0ee5438c
* Check targets (#3019) * Add extra sanity test to check aliases files. * Remove invalid target name. (cherry picked from commit27ba98a68e
) * Enable tests (#3015) * Enable tests. * Fix error message check. * Fix boolean tests. * Adjust to Python version. (cherry picked from commit9b1c6f0743
) Co-authored-by: Felix Fontein <felix@fontein.de>
54 lines
1 KiB
YAML
54 lines
1 KiB
YAML
- name: test msimple 1
|
|
msimple:
|
|
a: 80
|
|
register: simple1
|
|
|
|
- name: assert simple1
|
|
assert:
|
|
that:
|
|
- simple1.a == 80
|
|
- simple1.abc == "abc"
|
|
- simple1 is not changed
|
|
- simple1.value is none
|
|
|
|
- name: test msimple 2
|
|
msimple:
|
|
a: 101
|
|
ignore_errors: yes
|
|
register: simple2
|
|
|
|
- name: assert simple2
|
|
assert:
|
|
that:
|
|
- simple2.a == 101
|
|
- 'simple2.msg == "Module failed with exception: a >= 100"'
|
|
- simple2.abc == "abc"
|
|
- simple2 is failed
|
|
- simple2 is not changed
|
|
- simple2.value is none
|
|
|
|
- name: test msimple 3
|
|
msimple:
|
|
a: 2
|
|
b: potatoes
|
|
register: simple3
|
|
|
|
- name: assert simple3
|
|
assert:
|
|
that:
|
|
- simple3.a == 2
|
|
- simple3.b == "potatoespotatoes"
|
|
- simple3.c == "NoneNone"
|
|
- simple3 is not changed
|
|
|
|
- name: test msimple 4
|
|
msimple:
|
|
c: abc change
|
|
register: simple4
|
|
|
|
- name: assert simple4
|
|
assert:
|
|
that:
|
|
- simple4.c == "abc change"
|
|
- simple4.abc == "changed abc"
|
|
- simple4 is changed
|