From 2eb5333b50044c71756f2d8fabd557c5d19df90a Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Sat, 15 Aug 2015 12:26:35 -0400 Subject: [PATCH] fixed test to match new become output --- test/units/playbook/test_play_context.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/test/units/playbook/test_play_context.py b/test/units/playbook/test_play_context.py index fe475833ca..358e49f218 100644 --- a/test/units/playbook/test_play_context.py +++ b/test/units/playbook/test_play_context.py @@ -116,7 +116,7 @@ class TestPlayContext(unittest.TestCase): default_cmd = "/bin/foo" default_exe = "/bin/bash" sudo_exe = C.DEFAULT_SUDO_EXE - sudo_flags = C.DEFAULT_SUDO_FLAGS + sudo_flags = C.DEFAULT_SUDO_FLAGS + " -n " su_exe = C.DEFAULT_SU_EXE su_flags = C.DEFAULT_SU_FLAGS pbrun_exe = 'pbrun' @@ -132,7 +132,7 @@ class TestPlayContext(unittest.TestCase): play_context.become_method = 'sudo' cmd = play_context.make_become_cmd(cmd=default_cmd, executable="/bin/bash") - self.assertEqual(cmd, """%s -c '%s -k && %s %s -S -p "%s" -u %s %s -c '"'"'echo %s; %s'"'"''""" % (default_exe, sudo_exe, sudo_exe, sudo_flags, play_context.prompt, play_context.become_user, default_exe, play_context.success_key, default_cmd)) + self.assertEqual(cmd, """%s -c '%s %s -S -p "%s" -u %s %s -c '"'"'echo %s; %s'"'"''""" % (default_exe, sudo_exe, sudo_flags, play_context.prompt, play_context.become_user, default_exe, play_context.success_key, default_cmd)) play_context.become_method = 'su' cmd = play_context.make_become_cmd(cmd=default_cmd, executable="/bin/bash")