mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 00:55:19 +00:00
Add test for recuse error
This commit is contained in:
parent
04d6a02913
commit
7477583c97
15
tests/integration/files/file/base/recurse_ok_two.sls
Normal file
15
tests/integration/files/file/base/recurse_ok_two.sls
Normal file
@ -0,0 +1,15 @@
|
||||
nagios-nrpe-server:
|
||||
pkg:
|
||||
- installed
|
||||
service:
|
||||
- running
|
||||
- watch:
|
||||
- file: /etc/nagios/nrpe.cfg
|
||||
|
||||
/etc/nagios/nrpe.cfg:
|
||||
file:
|
||||
- managed
|
||||
- source: salt://baseserver/nrpe.cfg
|
||||
- require:
|
||||
- pkg: nagios-nrpe-server
|
||||
|
@ -37,11 +37,18 @@ class StateModuleTest(integration.ModuleCase):
|
||||
|
||||
def test_no_recurse(self):
|
||||
'''
|
||||
state.show_sls used to catch a recursive ref
|
||||
verify that a sls structure is NOT a recursive ref
|
||||
'''
|
||||
sls = self.run_function('state.show_sls', mods='recurse_ok')
|
||||
self.assertIn('snmpd', sls)
|
||||
|
||||
def test_no_recurse_two(self):
|
||||
'''
|
||||
verify that a sls structure is NOT a recursive ref
|
||||
'''
|
||||
sls = self.run_function('state.show_sls', mods='recurse_ok_two')
|
||||
self.assertIn('/etc/nagios/nrpe.cfg', sls)
|
||||
|
||||
if __name__ == "__main__":
|
||||
loader = TestLoader()
|
||||
tests = loader.loadTestsFromTestCase(StateModuleTest)
|
||||
|
Loading…
Reference in New Issue
Block a user