salt/tests/integration/runners/test_jobs.py

40 lines
980 B
Python
Raw Normal View History

# -*- coding: utf-8 -*-
2012-05-28 03:24:45 +00:00
'''
Tests for the salt-run command
'''
# Import Python libs
from __future__ import absolute_import
2012-05-28 03:24:45 +00:00
# Import Salt Testing libs
from tests.support.case import ShellCase
from tests.support.unit import skipIf
2012-05-28 03:24:45 +00:00
class ManageTest(ShellCase):
2012-05-28 03:24:45 +00:00
'''
Test the manage runner
'''
def test_active(self):
'''
jobs.active
'''
ret = self.run_run_plus('jobs.active')
self.assertEqual(ret['return'], {})
self.assertEqual(ret['out'], [])
2012-05-28 03:24:45 +00:00
def test_lookup_jid(self):
'''
jobs.lookup_jid
'''
ret = self.run_run_plus('jobs.lookup_jid', '23974239742394')
self.assertEqual(ret['return'], {})
2012-11-04 10:22:18 +00:00
self.assertEqual(ret['out'], [])
2012-05-28 03:24:45 +00:00
@skipIf(True, 'to be re-enabled when #23623 is merged')
2012-05-28 03:34:48 +00:00
def test_list_jobs(self):
'''
jobs.list_jobs
'''
ret = self.run_run_plus('jobs.list_jobs')
self.assertIsInstance(ret['return'], dict)