Add test for recursive sls data checks

This commit is contained in:
Thomas S Hatch 2012-05-13 21:31:46 -06:00
parent 86c5fcb5da
commit eead7e0dab
2 changed files with 20 additions and 0 deletions

View file

@ -0,0 +1,13 @@
mysql:
service:
- running
- require:
- file: /etc/mysql/my.cnf
/etc/mysql/my.cnf:
file:
- managed
- source: salt://master.cnf
- require:
- service: mysql

View file

@ -28,6 +28,13 @@ class StateModuleTest(integration.ModuleCase):
self.assertTrue(isinstance(low, list))
self.assertTrue(isinstance(low[0], dict))
def test_catch_recurse(self):
'''
state.show_sls used to catch a recursive ref
'''
err = self.run_function('state.sls', mods='recurse_fail')
print err
if __name__ == "__main__":
loader = TestLoader()
tests = loader.loadTestsFromTestCase(StateModuleTest)