mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
Include changes in the results when schedule.present state is run with test=True.
This commit is contained in:
parent
05faca63ea
commit
9f5a1a7f4b
3 changed files with 3 additions and 1 deletions
1
changelog/65652.fixed.md
Normal file
1
changelog/65652.fixed.md
Normal file
|
@ -0,0 +1 @@
|
|||
Include changes in the results when schedule.present state is run with test=True.
|
|
@ -264,6 +264,7 @@ def present(name, **kwargs):
|
|||
kwargs["test"] = True
|
||||
result = __salt__["schedule.add"](name, **kwargs)
|
||||
ret["comment"].append(result["comment"])
|
||||
ret["changes"] = {name: "added"}
|
||||
else:
|
||||
result = __salt__["schedule.add"](name, **kwargs)
|
||||
if not result["result"]:
|
||||
|
|
|
@ -220,7 +220,7 @@ def test_present():
|
|||
ret = {
|
||||
"name": "job1",
|
||||
"result": True,
|
||||
"changes": {},
|
||||
"changes": {"job1": "added"},
|
||||
"comment": "Job: test-schedule would be added to schedule.",
|
||||
}
|
||||
with patch.dict(schedule.__opts__, {"test": True}):
|
||||
|
|
Loading…
Add table
Reference in a new issue