Merge pull request #47408 from Ch3LL/skip_diskusage

Skip status.diskusage integration tests on macsox
This commit is contained in:
Nicole Thomas 2018-05-07 15:06:56 -04:00 committed by GitHub
commit e9c1723175
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 2 deletions

View file

@ -939,7 +939,7 @@ def diskusage(*args):
elif __grains__['kernel'] in ('FreeBSD', 'SunOS'):
ifile = __salt__['cmd.run']('mount -p').splitlines()
else:
ifile = []
raise CommandExecutionError('status.diskusage not yet supported on this platform')
for line in ifile:
comps = line.split()

View file

@ -49,7 +49,9 @@ class StatusModuleTest(ModuleCase):
status.diskusage
'''
ret = self.run_function('status.diskusage')
if salt.utils.is_windows():
if salt.utils.is_darwin():
self.assertIn('not yet supported on this platform', ret)
elif salt.utils.is_windows():
self.assertTrue(isinstance(ret['percent'], float))
else:
self.assertIn('total', str(ret))