mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Add some tests for states
This commit is contained in:
parent
24bc642508
commit
d00133e343
1 changed files with 24 additions and 0 deletions
24
tests/integration/modules/state.py
Normal file
24
tests/integration/modules/state.py
Normal file
|
@ -0,0 +1,24 @@
|
|||
# Import salt libs
|
||||
import integration
|
||||
|
||||
class StateModuleTest(integration.ModuleCase):
|
||||
'''
|
||||
Validate the test module
|
||||
'''
|
||||
def test_show_highstate(self):
|
||||
'''
|
||||
state.show_highstate
|
||||
'''
|
||||
high = self.run_function('state.show_highstate')
|
||||
self.assertTrue(isinstance(high, dict))
|
||||
self.assertTrue('/testfile' in high)
|
||||
self.assertEqual(high['/testfile']['__env__'], 'base')
|
||||
|
||||
def test_show_lowstate(self):
|
||||
'''
|
||||
state.show_lowstate
|
||||
'''
|
||||
low = self.run_function('state.show_lowstate')
|
||||
self.assertTrue(isinstance(low, list))
|
||||
self.assertTrue(isinstance(low[0], dict))
|
||||
|
Loading…
Add table
Reference in a new issue