salt/tests/integration/runners/jobs.py
Erik Johnson 92d6d4ab75 Fix incorrect key for return data
The return data from run_run_plus previously returned the runner return
in the ``fun`` key. This has since been corrected. This commit replaces
these references to the ``fun`` key with the corrected ``return`` key.
2016-09-03 14:59:04 -05:00

49 lines
1.1 KiB
Python

# -*- coding: utf-8 -*-
'''
Tests for the salt-run command
'''
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing libs
from salttesting import skipIf
from salttesting.helpers import ensure_in_syspath
ensure_in_syspath('../../')
# Import salt libs
import integration
class ManageTest(integration.ShellCase):
'''
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'], [])
def test_lookup_jid(self):
'''
jobs.lookup_jid
'''
ret = self.run_run_plus('jobs.lookup_jid', '23974239742394')
self.assertEqual(ret['return'], {})
self.assertEqual(ret['out'], [])
@skipIf(True, 'to be reenabled when #23623 is merged')
def test_list_jobs(self):
'''
jobs.list_jobs
'''
ret = self.run_run_plus('jobs.list_jobs')
self.assertIsInstance(ret['return'], dict)
if __name__ == '__main__':
from integration import run_tests
run_tests(ManageTest)