Merge pull request #45337 from twangboy/win_fix_test_core

Fix `unit.grains.test_core` for Windows
This commit is contained in:
Nicole Thomas 2018-01-09 10:03:11 -05:00 committed by GitHub
commit 227cdbda70
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -499,6 +499,7 @@ PATCHLEVEL = 3
self.assertEqual(_grains.get('iscsi_iqn'),
['iqn.1991-05.com.microsoft:simon-x1'])
@skipIf(salt.utils.platform.is_windows(), 'System is Windows')
def test_aix_iscsi_iqn_grains(self):
cmd_run_mock = MagicMock(
return_value='initiator_name iqn.localhost.hostid.7f000001'
@ -515,6 +516,7 @@ PATCHLEVEL = 3
['iqn.localhost.hostid.7f000001'])
@skipIf(salt.utils.platform.is_darwin(), 'MacOSX iscsi grains not supported')
@skipIf(salt.utils.platform.is_windows(), 'System is Windows')
def test_linux_iscsi_iqn_grains(self):
_iscsi_file = '## DO NOT EDIT OR REMOVE THIS FILE!\n' \
'## If you remove this file, the iSCSI daemon will not start.\n' \
@ -618,6 +620,7 @@ SwapTotal: 4789244 kB'''
self.assertEqual(os_grains.get('mem_total'), 15895)
self.assertEqual(os_grains.get('swap_total'), 4676)
@skipIf(salt.utils.platform.is_windows(), 'System is Windows')
def test_bsd_memdata(self):
'''
Test to memdata on *BSD systems
@ -687,6 +690,7 @@ SwapTotal: 4789244 kB'''
self.assertEqual(os_grains.get('mem_total'), 2023)
self.assertEqual(os_grains.get('swap_total'), 400)
@skipIf(salt.utils.platform.is_windows(), 'System is Windows')
def test_docker_virtual(self):
'''
Test if OS grains are parsed correctly in Ubuntu Xenial Xerus