|
|
@ -2,6 +2,7 @@
|
|
|
|
Test bundled filters
|
|
|
|
Test bundled filters
|
|
|
|
'''
|
|
|
|
'''
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import os.path
|
|
|
|
import unittest, tempfile, shutil
|
|
|
|
import unittest, tempfile, shutil
|
|
|
|
from ansible import playbook, inventory, callbacks
|
|
|
|
from ansible import playbook, inventory, callbacks
|
|
|
|
import ansible.runner.filter_plugins.core
|
|
|
|
import ansible.runner.filter_plugins.core
|
|
|
@ -83,6 +84,11 @@ class TestFilters(unittest.TestCase):
|
|
|
|
a = ansible.runner.filter_plugins.core.quote('ls | wc -l')
|
|
|
|
a = ansible.runner.filter_plugins.core.quote('ls | wc -l')
|
|
|
|
assert a == "'ls | wc -l'"
|
|
|
|
assert a == "'ls | wc -l'"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def test_fileglob(self):
|
|
|
|
|
|
|
|
pathname = os.path.join(os.path.dirname(__file__), '*')
|
|
|
|
|
|
|
|
a = ansible.runner.filter_plugins.core.fileglob(pathname)
|
|
|
|
|
|
|
|
assert __file__ in a
|
|
|
|
|
|
|
|
|
|
|
|
#def test_filters(self):
|
|
|
|
#def test_filters(self):
|
|
|
|
|
|
|
|
|
|
|
|
# this test is pretty low level using a playbook, hence I am disabling it for now -- MPD.
|
|
|
|
# this test is pretty low level using a playbook, hence I am disabling it for now -- MPD.
|
|
|
|