8000 [master] override test kwarg to be a bool for state.apply and state.highstate by ITJamie · Pull Request #65876 · saltstack/salt · GitHub
[go: up one dir, main page]

Skip to content

[master] override test kwarg to be a bool for state.apply and state.highstate #65876

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 19, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion salt/engines/slack_bolt_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -969,7 +969,6 @@ def run_commands_from_slack_async(
del outstanding[jid]

def run_command_async(self, msg):

"""
:type msg: dict
:param msg: The message dictionary that contains the command and all information.
Expand All @@ -985,6 +984,12 @@ def run_command_async(self, msg):
# Check for pillar string representation of dict and convert it to dict
if "pillar" in kwargs:
kwargs.update(pillar=ast.literal_eval(kwargs["pillar"]))
if "test" in kwargs and cmd.lower() in ["state.apply", "state.highstate"]:
if str(kwargs["test"]).lower() in ["true", "false"]:
if kwargs["test"].lower() == "true":
kwargs["test"] = True
else:
kwargs["test"] = False

# Check for target. Otherwise assume None
target = msg["target"]["target"]
Expand Down
0