mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Updated test per reviewer's comments
This commit is contained in:
parent
1bbe6489fd
commit
ee75a65837
1 changed files with 3 additions and 4 deletions
|
@ -399,15 +399,14 @@ def test_selinux_add_policy_regex(name, sel_type):
|
|||
):
|
||||
selinux.fcontext_add_policy(name, sel_type=sel_type)
|
||||
filespec = re.escape(name)
|
||||
filespec_test = f"'{filespec}'"
|
||||
expected_cmd_shell = f"semanage fcontext -l | egrep {filespec_test}"
|
||||
expected_cmd_shell = f"semanage fcontext -l | egrep '{filespec}'"
|
||||
mock_cmd_shell.assert_called_once_with(
|
||||
f"{expected_cmd_shell}",
|
||||
expected_cmd_shell,
|
||||
ignore_retcode=True,
|
||||
)
|
||||
expected_cmd_run_all = (
|
||||
f"semanage fcontext --modify --type {sel_type} {filespec}"
|
||||
)
|
||||
mock_cmd_run_all.assert_called_once_with(
|
||||
f"{expected_cmd_run_all}",
|
||||
expected_cmd_run_all,
|
||||
)
|
||||
|
|
Loading…
Add table
Reference in a new issue