mirror of
https://github.com/ansible-collections/community.general.git
synced 2024-09-14 20:13:21 +02:00
Merge pull request #7007 from tima/test-sudo-cmd-esc
Fixed escaping of " in test_make_sudo_cmd in TestUtils so that it passes as it should.
This commit is contained in:
commit
8d060685fa
1 changed files with 1 additions and 1 deletions
|
@ -503,7 +503,7 @@ class TestUtils(unittest.TestCase):
|
|||
self.assertTrue(isinstance(cmd, tuple))
|
||||
self.assertEqual(len(cmd), 3)
|
||||
self.assertTrue('-u root' in cmd[0])
|
||||
self.assertTrue('-p "[sudo via ansible, key=' in cmd[0] and cmd[1].startswith('[sudo via ansible, key'))
|
||||
self.assertTrue('-p \\"[sudo via ansible, key=' in cmd[0] and cmd[1].startswith('[sudo via ansible, key'))
|
||||
self.assertTrue('echo SUDO-SUCCESS-' in cmd[0] and cmd[2].startswith('SUDO-SUCCESS-'))
|
||||
self.assertTrue('sudo -k' in cmd[0])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue