mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Merge pull request #44131 from rallytime/bp-44029
Back-port #44029 to 2016.11
This commit is contained in:
commit
0cd493b691
2 changed files with 2 additions and 2 deletions
|
@ -159,7 +159,7 @@ def formatted(name, fs_type='ext4', force=False, **kwargs):
|
|||
ret['result'] = None
|
||||
return ret
|
||||
|
||||
__salt__['disk.format_'](name, fs_type, force=force, **kwargs)
|
||||
__salt__['disk.format'](name, fs_type, force=force, **kwargs)
|
||||
current_fs = __salt__['disk.fstype'](name)
|
||||
|
||||
# Repeat lsblk check up to 10 times with 3s sleeping between each
|
||||
|
|
|
@ -80,7 +80,7 @@ class BlockdevTestCase(TestCase):
|
|||
mock_t = MagicMock(return_value=True)
|
||||
mock_e = MagicMock(return_value='')
|
||||
with patch.dict(blockdev.__salt__, {'cmd.run': mock_ext4,
|
||||
'disk.format_': mock_t,
|
||||
'disk.format': mock_t,
|
||||
'disk.fstype': mock_e}):
|
||||
comt = ('{0} already formatted with '.format(name))
|
||||
ret.update({'comment': comt, 'result': True})
|
||||
|
|
Loading…
Add table
Reference in a new issue