salt/tests/integration/runners/manage.py

44 lines
1.0 KiB
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2012-05-28 03:02:29 +00:00
'''
Tests for the salt-run command
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
2012-05-28 03:02:29 +00:00
# Import salt libs
import integration
2012-05-28 03:02:29 +00:00
class ManageTest(integration.ShellCase):
'''
Test the manage runner
'''
def test_up(self):
'''
manage.up
'''
ret = self.run_run_plus('manage.up')
self.assertIn('minion', ret['fun'])
self.assertIn('sub_minion', ret['fun'])
2014-11-07 21:46:12 +00:00
self.assertIn('- minion', ret['out'])
self.assertIn('- sub_minion', ret['out'])
2012-05-28 03:02:29 +00:00
def test_down(self):
'''
manage.down
'''
ret = self.run_run_plus('manage.down')
self.assertNotIn('minion', ret['fun'])
self.assertNotIn('sub_minion', ret['fun'])
self.assertNotIn('minion', ret['out'])
self.assertNotIn('sub_minion', ret['out'])
if __name__ == '__main__':
from integration import run_tests
run_tests(ManageTest)