mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #35753 from rallytime/fix-client-unit-test
Fixup the unit.client_test.LocalClientTestCase.test_cmd_subset from #35720
This commit is contained in:
commit
b3f6367621
1 changed files with 14 additions and 5 deletions
|
@ -56,14 +56,23 @@ class LocalClientTestCase(TestCase,
|
|||
def test_cmd_subset(self, cmd_mock):
|
||||
with patch('salt.client.LocalClient.cmd_cli') as cmd_cli_mock:
|
||||
self.client.cmd_subset('*', 'first.func', sub=1, cli=True)
|
||||
cmd_cli_mock.assert_called_with(['minion1'], 'first.func', (), progress=False,
|
||||
try:
|
||||
cmd_cli_mock.assert_called_with(['minion2'], 'first.func', (), progress=False,
|
||||
kwarg=None, expr_form='list',
|
||||
ret=['first.func', 'second.func'])
|
||||
|
||||
ret='')
|
||||
except AssertionError:
|
||||
cmd_cli_mock.assert_called_with(['minion1'], 'first.func', (), progress=False,
|
||||
kwarg=None, expr_form='list',
|
||||
ret='')
|
||||
self.client.cmd_subset('*', 'first.func', sub=10, cli=True)
|
||||
cmd_cli_mock.assert_called_with(['minion1', 'minion2'], 'first.func', (), progress=False,
|
||||
try:
|
||||
cmd_cli_mock.assert_called_with(['minion2', 'minion1'], 'first.func', (), progress=False,
|
||||
kwarg=None, expr_form='list',
|
||||
ret=['first.func', 'second.func'])
|
||||
ret='')
|
||||
except AssertionError:
|
||||
cmd_cli_mock.assert_called_with(['minion1', 'minion2'], 'first.func', (), progress=False,
|
||||
kwarg=None, expr_form='list',
|
||||
ret='')
|
||||
|
||||
@skipIf(NOT_ZMQ, 'This test only works with ZeroMQ')
|
||||
def test_pub(self):
|
||||
|
|
Loading…
Add table
Reference in a new issue