diff options
author | Tegan Snyder <tsnyder@tegdesign.com> | 2016-04-25 17:24:26 +0200 |
---|---|---|
committer | Brian Coca <bcoca@ansible.com> | 2016-04-25 17:24:26 +0200 |
commit | bf0da4aa3c0417551c9163f13ed05dc5d70322ab (patch) | |
tree | ccf86d77c8712894edcff2cea136cc581b544c5f /test/units/playbook/test_play_context.py | |
parent | Add sas_address and sas_device_handle to ansible disk device facts (#15201) (diff) | |
download | ansible-bf0da4aa3c0417551c9163f13ed05dc5d70322ab.tar.xz ansible-bf0da4aa3c0417551c9163f13ed05dc5d70322ab.zip |
add centrify dzdo escalation (#15219)
add dzdo context, and test
Diffstat (limited to 'test/units/playbook/test_play_context.py')
-rw-r--r-- | test/units/playbook/test_play_context.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/units/playbook/test_play_context.py b/test/units/playbook/test_play_context.py index c18f9e637e..1f52fc1678 100644 --- a/test/units/playbook/test_play_context.py +++ b/test/units/playbook/test_play_context.py @@ -131,6 +131,7 @@ class TestPlayContext(unittest.TestCase): pfexec_flags = '' doas_exe = 'doas' doas_flags = ' -n -u foo ' + dzdo_exe = 'dzdo' cmd = play_context.make_become_cmd(cmd=default_cmd, executable=default_exe) self.assertEqual(cmd, default_cmd) @@ -166,6 +167,10 @@ class TestPlayContext(unittest.TestCase): play_context.become_method = 'bad' self.assertRaises(AnsibleError, play_context.make_become_cmd, cmd=default_cmd, executable="/bin/bash") + play_context.become_method = 'dzdo' + cmd = play_context.make_become_cmd(cmd=default_cmd, executable="/bin/bash") + self.assertEqual(cmd, """%s -u %s %s -c 'echo %s; %s'""" % (dzdo_exe, play_context.become_user, default_exe, play_context.success_key, default_cmd)) + class TestTaskAndVariableOverrride(unittest.TestCase): inventory_vars = ( |