From bc65956798d717bd1e464cb181a086bf531b1ff7 Mon Sep 17 00:00:00 2001 From: Michael DeHaan Date: Thu, 20 Feb 2014 15:23:44 -0500 Subject: [PATCH] Add tests that leverage most of our custom filters. A few more to add. --- lib/ansible/runner/filter_plugins/core.py | 2 ++ tests_new/integration/non_destructive.yml | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lib/ansible/runner/filter_plugins/core.py b/lib/ansible/runner/filter_plugins/core.py index a99b17f67a1..9b9a9b5cf2b 100644 --- a/lib/ansible/runner/filter_plugins/core.py +++ b/lib/ansible/runner/filter_plugins/core.py @@ -42,6 +42,8 @@ def failed(*a, **kw): ''' Test if task result yields failed ''' item = a[0] if type(item) != dict: + print "DEBUG: GOT A" + print item raise errors.AnsibleFilterError("|failed expects a dictionary") rc = item.get('rc',0) failed = item.get('failed',False) diff --git a/tests_new/integration/non_destructive.yml b/tests_new/integration/non_destructive.yml index b30a7f13eb6..2560a2e599e 100644 --- a/tests_new/integration/non_destructive.yml +++ b/tests_new/integration/non_destructive.yml @@ -24,3 +24,5 @@ - { role: test_lineinfile, tags: test_lineinfile } - { role: test_ignore_errors, tags: test_ignore_errors } - { role: test_unarchive, tags: test_unarchive } + - { role: test_filters, tags: test_filters } +