Merge pull request #40678 from Ch3LL/fix_mac_fstype

fix test_fstype test for mac
This commit is contained in:
Nicole Thomas 2017-04-13 13:20:31 -06:00 committed by GitHub
commit 39dd6e284d

View file

@ -149,8 +149,9 @@ class DiskTestCase(TestCase):
device = '/dev/sdX1'
fs_type = 'ext4'
mock = MagicMock(return_value='FSTYPE\n{0}'.format(fs_type))
with patch.dict(disk.__salt__, {'cmd.run': mock}):
self.assertEqual(disk.fstype(device), fs_type)
with patch.dict(disk.__grains__, {'kernel': 'Linux'}):
with patch.dict(disk.__salt__, {'cmd.run': mock}):
self.assertEqual(disk.fstype(device), fs_type)
@skipIf(not salt.utils.which('resize2fs'), 'resize2fs not found')
def test_resize2fs(self):