Add tests for the jinja demands

This commit is contained in:
Thomas S Hatch 2015-04-15 16:39:08 -06:00
parent 59fe49bb2c
commit 586b81b33e
2 changed files with 35 additions and 0 deletions

View File

@ -0,0 +1,6 @@
{# This syntax should be equivalent to salt['test.ping']() #}
{% set is_true = salt.test.ping() %}
always-passes:
test.succeed_without_changes:
- name: is_true_{{ is_true }}

View File

@ -0,0 +1,29 @@
# coding: utf-8
'''
Integration tests for renderer functions
'''
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import salt libs
import integration
class TestJinjaRenderer(integration.ModuleCase):
'''
Validate that ordering works correctly
'''
def test_dot_notation(self):
'''
Test the Jinja dot-notation syntax for calling execution modules
'''
ret = self.run_function('state.sls', ['jinja_dot_notation'])
for state_ret in ret.values():
self.assertTrue(state_ret['result'])
if __name__ == '__main__':
from integration import run_tests
run_tests(TestJinjaRenderer)