mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 17:09:03 +00:00
Merge branch '2015.2' into develop
This commit is contained in:
commit
eeb6dadc21
@ -36,7 +36,7 @@ def _list_taps():
|
||||
return _call_brew(cmd)['stdout'].splitlines()
|
||||
|
||||
|
||||
def _tap(tap):
|
||||
def _tap(tap, runas=None):
|
||||
'''
|
||||
Add unofficial Github repos to the list of formulas that brew tracks,
|
||||
updates, and installs from.
|
||||
|
@ -61,7 +61,8 @@ class BrewTestCase(TestCase):
|
||||
mock_cmd = MagicMock(return_value='')
|
||||
with patch.dict(brew.__salt__, {'cmd.run_all': mock_failure,
|
||||
'file.get_user': mock_user,
|
||||
'cmd.run': mock_cmd}):
|
||||
'cmd.run': mock_cmd,
|
||||
'cmd.retcode': mock_failure}):
|
||||
self.assertFalse(brew._tap('homebrew/test'))
|
||||
|
||||
@patch('salt.modules.brew._list_taps', MagicMock(return_value=TAPS_LIST))
|
||||
@ -69,12 +70,7 @@ class BrewTestCase(TestCase):
|
||||
'''
|
||||
Tests adding unofficial Github repos to the list of brew taps
|
||||
'''
|
||||
mock_success = MagicMock(return_value={'retcode': 0})
|
||||
mock_user = MagicMock(return_value='foo')
|
||||
mock_cmd = MagicMock(return_value='')
|
||||
with patch.dict(brew.__salt__, {'cmd.run_all': mock_success,
|
||||
'file.get_user': mock_user,
|
||||
'cmd.run': mock_cmd}):
|
||||
with patch.dict(brew.__salt__, {'cmd.retcode': MagicMock(return_value=0)}):
|
||||
self.assertTrue(brew._tap('homebrew/test'))
|
||||
|
||||
# '_homebrew_bin' function tests: 1
|
||||
|
Loading…
Reference in New Issue
Block a user