mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-23 21:30:22 -07:00
* Experimental change from OpenIndiana
* resolve pfexec problem, by removing superfluous quotes
* reimplement "wrap_exe"
* remove spaces arround keyword argument assignment
* adapted pfexec unit test
* Try to fix quoting of test expression
* Fix quoting of test expression by replacing ' with "
* Add changelog fragment
(cherry picked from commit dc2d3c24fa
)
Co-authored-by: manschwetusCS <30724946+manschwetusCS@users.noreply.github.com>
This commit is contained in:
parent
b7b5c1852e
commit
cb26897b3e
3 changed files with 6 additions and 4 deletions
|
@ -31,7 +31,7 @@ def test_pfexec_basic(mocker, parser, reset_cli_args):
|
|||
var_options = {}
|
||||
cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe)
|
||||
print(cmd)
|
||||
assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
|
||||
|
||||
def test_pfexec(mocker, parser, reset_cli_args):
|
||||
|
@ -53,7 +53,7 @@ def test_pfexec(mocker, parser, reset_cli_args):
|
|||
var_options = {}
|
||||
cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe)
|
||||
print(cmd)
|
||||
assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
|
||||
|
||||
def test_pfexec_varoptions(mocker, parser, reset_cli_args):
|
||||
|
@ -78,4 +78,4 @@ def test_pfexec_varoptions(mocker, parser, reset_cli_args):
|
|||
}
|
||||
cmd = call_become_plugin(task, var_options, cmd=default_cmd, executable=default_exe)
|
||||
print(cmd)
|
||||
assert re.match('''%s %s "'echo %s; %s'"''' % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
assert re.match("""%s %s 'echo %s; %s'""" % (pfexec_exe, pfexec_flags, success, default_cmd), cmd) is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue