Merge pull request #44131 from rallytime/bp-44029

Back-port #44029 to 2016.11
This commit is contained in:
Nicole Thomas 2017-10-17 11:05:38 -04:00 committed by GitHub
commit 0cd493b691
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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})