mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
add whoami test
This commit is contained in:
parent
4b28e510f1
commit
38d114a2d2
1 changed files with 10 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue