mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #7563 from tima/fix-testutils-su
Recent BSD su work introduced a failing test. Removed leading space from...
This commit is contained in:
commit
617e7eaf5b
1 changed files with 1 additions and 1 deletions
|
@ -512,7 +512,7 @@ class TestUtils(unittest.TestCase):
|
||||||
cmd = ansible.utils.make_su_cmd('root', '/bin/sh', '/bin/ls')
|
cmd = ansible.utils.make_su_cmd('root', '/bin/sh', '/bin/ls')
|
||||||
self.assertTrue(isinstance(cmd, tuple))
|
self.assertTrue(isinstance(cmd, tuple))
|
||||||
self.assertEqual(len(cmd), 3)
|
self.assertEqual(len(cmd), 3)
|
||||||
self.assertTrue(' root -c "/bin/sh' in cmd[0])
|
self.assertTrue('root -c "/bin/sh' in cmd[0])
|
||||||
self.assertTrue(re.compile(cmd[1]))
|
self.assertTrue(re.compile(cmd[1]))
|
||||||
self.assertTrue('echo SUDO-SUCCESS-' in cmd[0] and cmd[2].startswith('SUDO-SUCCESS-'))
|
self.assertTrue('echo SUDO-SUCCESS-' in cmd[0] and cmd[2].startswith('SUDO-SUCCESS-'))
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue