Merge pull request #35640 from cachedout/quiet_wheel

Support the supression of prints in the wheel module
This commit is contained in:
Mike Place 2016-08-22 13:12:56 +09:00 committed by GitHub
commit ad433e5024
3 changed files with 6 additions and 3 deletions

View File

@ -50,7 +50,7 @@ class WheelClient(salt.client.mixins.SyncClientMixin,
'''
Backwards compatibility
'''
return self.low(fun, kwargs)
return self.low(fun, kwargs, print_event=low.get('print_event', True), full_return=low.get('full_return', False))
# TODO: Inconsistent with runner client-- the runner client's master_call gives
# an async return, unlike this

View File

@ -35,6 +35,7 @@ class WheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTest
low = {
'client': 'wheel',
'fun': 'key.list_all',
'print_event': False
}
low.update(self.eauth_creds)
@ -60,12 +61,14 @@ class WheelModuleTest(integration.TestCase, integration.AdaptedConfigurationTest
'client': 'wheel',
'fun': 'key.list_all',
'token': token['token'],
'print_event': False,
})
def test_cmd_sync(self):
low = {
'client': 'wheel',
'fun': 'key.list_all',
'print_event': False,
}
low.update(self.eauth_creds)

View File

@ -13,12 +13,12 @@ class KeyWheelModuleTest(integration.TestCase, integration.AdaptedConfigurationT
self.wheel = salt.wheel.Wheel(dict(self.get_config('client_config')))
def test_list_all(self):
ret = self.wheel.call_func('key.list_all')
ret = self.wheel.cmd('key.list_all', print_event=False)
for host in ['minion', 'sub_minion']:
self.assertIn(host, ret['minions'])
def test_gen(self):
ret = self.wheel.call_func('key.gen', id_='soundtechniciansrock')
ret = self.wheel.cmd('key.gen', id_='soundtechniciansrock', print_event=False)
self.assertIn('pub', ret)
self.assertIn('priv', ret)