Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Multiple onchanges requisite behaviour
Change the onchanges requisite so that if you list multiple onchanges requisites then only one must change to trigger the state. Currently all the watched states must change to cause the trigger. This fixes #19592
- Loading branch information
mattmb
committed
Jun 16, 2015
1 parent
211bf36
commit a5607d5
Showing
4 changed files
with
72 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
tests/integration/files/file/base/requisites/onchanges_multiple.sls
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
changing_state: | ||
cmd.run: | ||
- name: echo "Changed!" | ||
|
||
another_changing_state: | ||
cmd.run: | ||
- name: echo "Changed!" | ||
|
||
# mock is installed with salttesting, so it should already be | ||
# present on the system, resulting in no changes | ||
non_changing_state: | ||
pip.installed: | ||
- name: mock | ||
|
||
another_non_changing_state: | ||
pip.installed: | ||
- name: mock | ||
|
||
test_two_changing_states: | ||
cmd.run: | ||
- name: echo "Success!" | ||
- onchanges: | ||
- cmd: changing_state | ||
- cmd: another_changing_state | ||
|
||
test_two_non_changing_states: | ||
cmd.run: | ||
- name: echo "Should not run" | ||
- onchanges: | ||
- pip: non_changing_state | ||
- pip: another_non_changing_state | ||
|
||
test_one_changing_state: | ||
cmd.run: | ||
- name: echo "Success!" | ||
- onchanges: | ||
- cmd: changing_state | ||
- pip: non_changing_state |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters