mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Add RunnerClient test for old/new-style arg/kwarg parsing
This commit is contained in:
parent
ec377ab379
commit
d11f5381a4
@ -97,6 +97,35 @@ class RunnerModuleTest(integration.TestCase, integration.AdaptedConfigurationTes
|
||||
}
|
||||
self.runner.cmd_sync(low)
|
||||
|
||||
def test_cmd_sync_arg_kwarg_parsing(self):
|
||||
low = {
|
||||
'client': 'runner',
|
||||
'fun': 'test.arg',
|
||||
'arg': [
|
||||
'foo',
|
||||
'bar=off',
|
||||
'baz={qux: 123}'
|
||||
],
|
||||
'kwarg': {
|
||||
'quux': 'Quux',
|
||||
},
|
||||
'quuz': 'on',
|
||||
}
|
||||
low.update(self.eauth_creds)
|
||||
|
||||
ret = self.runner.cmd_sync(low)
|
||||
self.assertEqual(ret, {
|
||||
'args': ['foo'],
|
||||
'kwargs': {
|
||||
'bar': False,
|
||||
'baz': {
|
||||
'qux': 123,
|
||||
},
|
||||
'quux': 'Quux',
|
||||
'quuz': 'on',
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
from integration import run_tests
|
||||
|
Loading…
Reference in New Issue
Block a user