mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-06-28 03:00:23 -07:00
Add tests that leverage most of our custom filters. A few more to add.
This commit is contained in:
parent
8336cd7fa6
commit
bc65956798
2 changed files with 4 additions and 0 deletions
|
@ -42,6 +42,8 @@ def failed(*a, **kw):
|
||||||
''' Test if task result yields failed '''
|
''' Test if task result yields failed '''
|
||||||
item = a[0]
|
item = a[0]
|
||||||
if type(item) != dict:
|
if type(item) != dict:
|
||||||
|
print "DEBUG: GOT A"
|
||||||
|
print item
|
||||||
raise errors.AnsibleFilterError("|failed expects a dictionary")
|
raise errors.AnsibleFilterError("|failed expects a dictionary")
|
||||||
rc = item.get('rc',0)
|
rc = item.get('rc',0)
|
||||||
failed = item.get('failed',False)
|
failed = item.get('failed',False)
|
||||||
|
|
|
@ -24,3 +24,5 @@
|
||||||
- { role: test_lineinfile, tags: test_lineinfile }
|
- { role: test_lineinfile, tags: test_lineinfile }
|
||||||
- { role: test_ignore_errors, tags: test_ignore_errors }
|
- { role: test_ignore_errors, tags: test_ignore_errors }
|
||||||
- { role: test_unarchive, tags: test_unarchive }
|
- { role: test_unarchive, tags: test_unarchive }
|
||||||
|
- { role: test_filters, tags: test_filters }
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue