salt/tests/integration/runners/test_manage.py

35 lines
937 B
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 tests.support.case import ShellCase
2012-05-28 03:02:29 +00:00
class ManageTest(ShellCase):
2012-05-28 03:02:29 +00:00
'''
Test the manage runner
'''
def test_up(self):
'''
manage.up
'''
ret = self.run_run_plus('manage.up')
self.assertIn('minion', ret['return'])
self.assertIn('sub_minion', ret['return'])
self.assertTrue(any('- minion' in out for out in ret['out']))
self.assertTrue(any('- sub_minion' in out for out in 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['return'])
self.assertNotIn('sub_minion', ret['return'])
2012-05-28 03:02:29 +00:00
self.assertNotIn('minion', ret['out'])
self.assertNotIn('sub_minion', ret['out'])