mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add test for recursive sls data checks
This commit is contained in:
parent
86c5fcb5da
commit
eead7e0dab
2 changed files with 20 additions and 0 deletions
13
tests/integration/files/file/base/recurse_fail.sls
Normal file
13
tests/integration/files/file/base/recurse_fail.sls
Normal 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
|
||||
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue