mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Add tests for overstate requisites
This commit is contained in:
parent
e228768961
commit
9752b21343
33
tests/integration/runners/state.py
Normal file
33
tests/integration/runners/state.py
Normal file
@ -0,0 +1,33 @@
|
||||
'''
|
||||
Tests for the salt-run command
|
||||
'''
|
||||
# Import python libs
|
||||
import sys
|
||||
import os
|
||||
|
||||
# Import Salt Modules
|
||||
from saltunittest import TestLoader, TextTestRunner
|
||||
import integration
|
||||
from integration import TestDaemon
|
||||
|
||||
|
||||
class ManageTest(integration.ShellCase):
|
||||
'''
|
||||
Test the manage runner
|
||||
'''
|
||||
def test_over(self):
|
||||
'''
|
||||
state.over
|
||||
'''
|
||||
os_fn = os.path.join(integration.FILES, 'over/req_fail.sls')
|
||||
ret = '\n'.join(self.run_run('state.over os_fn={0}'.format(os_fn)))
|
||||
self.assertIn('Requisite fail_stage failed for stage', ret)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
loader = TestLoader()
|
||||
tests = loader.loadTestsFromTestCase(ManageTest)
|
||||
print('Setting up Salt daemons to execute tests')
|
||||
with TestDaemon():
|
||||
runner = TextTestRunner(verbosity=1).run(tests)
|
||||
sys.exit(runner.wasSuccessful())
|
Loading…
Reference in New Issue
Block a user