Merge pull request #47882 from frogunder/45013

add whoami test
This commit is contained in:
Nicole Thomas 2018-05-30 09:47:12 -04:00 committed by GitHub
commit cbe2ecfae8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -253,3 +253,13 @@ class CMDModuleTest(ModuleCase):
f_timeout=2,
python_shell=True)
self.assertEqual(out, 'hello')
def test_cmd_run_whoami(self):
'''
test return of whoami
'''
cmd = self.run_function('cmd.run', ['whoami'])
if salt.utils.is_windows():
self.assertIn('administrator', cmd)
else:
self.assertEqual('root', cmd)