From 5bac17de515de214cd6e5eae2fbfe089064e13ca Mon Sep 17 00:00:00 2001 From: Brian Coca Date: Mon, 15 Jun 2015 01:20:38 -0400 Subject: [PATCH] fixed pfexec test --- test/units/executor/test_connection_information.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/units/executor/test_connection_information.py b/test/units/executor/test_connection_information.py index 010639d368..9d702b77ab 100644 --- a/test/units/executor/test_connection_information.py +++ b/test/units/executor/test_connection_information.py @@ -126,6 +126,8 @@ class TestConnectionInformation(unittest.TestCase): su_flags = C.DEFAULT_SU_FLAGS pbrun_exe = 'pbrun' pbrun_flags = '' + pfexec_exe = 'pfexec' + pfexec_flags = '' (cmd, prompt, key) = conn_info.make_become_cmd(cmd=default_cmd, executable=default_exe) self.assertEqual(cmd, default_cmd) @@ -147,7 +149,7 @@ class TestConnectionInformation(unittest.TestCase): conn_info.become_method = 'pfexec' (cmd, prompt, key) = conn_info.make_become_cmd(cmd=default_cmd, executable="/bin/bash") - self.assertEqual(cmd, """%s -c '%s %s "'"'"'echo %s; %s'"'"'"'""" % (default_exe, pbrun_exe, pbrun_flags, key, default_cmd)) + self.assertEqual(cmd, """%s -c '%s %s "'"'"'echo %s; %s'"'"'"'""" % (default_exe, pfexec_exe, pfexec_flags, key, default_cmd)) conn_info.become_method = 'bad' self.assertRaises(AnsibleError, conn_info.make_become_cmd, cmd=default_cmd, executable="/bin/bash")