Add salt-ssh mine.get integration test

This commit is contained in:
Ch3LL 2017-11-27 16:38:19 -05:00
parent d6ccf4bb30
commit f90b4f7653
No known key found for this signature in database
GPG key ID: 132B55A7C13EFA73
2 changed files with 26 additions and 0 deletions

View file

@ -1,3 +1,5 @@
localhost:
host: 127.0.0.1
port: 2827
mine_functions:
test.arg: ['itworked']

View file

@ -0,0 +1,24 @@
# -*- coding: utf-8 -*-
# Import Python libs
from __future__ import absolute_import
# Import Salt Testing Libs
from tests.support.case import SSHCase
from tests.support.unit import skipIf
# Import Salt Libs
import salt.utils
@skipIf(salt.utils.is_windows(), 'salt-ssh not available on Windows')
class SSHMineTest(SSHCase):
'''
testing salt-ssh with mine
'''
def test_ssh_mine_get(self):
'''
test salt-ssh with mine
'''
ret = self.run_function('mine.get', ['localhost test.arg'], wipe=False)
self.assertEqual(ret['localhost']['args'], ['itworked'])