-
Notifications
You must be signed in to change notification settings - Fork 57
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
(MODULES-6739) Add Testmode switcher #124
Merged
michaeltlombardi
merged 2 commits into
puppetlabs:master
from
jpogran:MODULES-6739-add-testmode
Mar 20, 2018
Merged
(MODULES-6739) Add Testmode switcher #124
michaeltlombardi
merged 2 commits into
puppetlabs:master
from
jpogran:MODULES-6739-add-testmode
Mar 20, 2018
Conversation
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
jpogran
force-pushed
the
MODULES-6739-add-testmode
branch
8 times, most recently
from
March 6, 2018 18:47
9812e83
to
d8b99a2
Compare
jpogran
force-pushed
the
MODULES-6739-add-testmode
branch
8 times, most recently
from
March 16, 2018 18:28
15eec0e
to
3f2170a
Compare
This commit adds the necessary entries to the acceptance setup in order for testmode switcher to work.
jpogran
force-pushed
the
MODULES-6739-add-testmode
branch
2 times, most recently
from
March 16, 2018 18:46
36613ec
to
4070eae
Compare
jpogran
changed the title
(WIP)(MODULES-6739) Add Testmode switcher
(MODULES-6739) Add Testmode switcher
Mar 19, 2018
jpogran
force-pushed
the
MODULES-6739-add-testmode
branch
2 times, most recently
from
March 19, 2018 16:04
5784ac6
to
781d34d
Compare
michaeltlombardi
suggested changes
Mar 20, 2018
@@ -45,7 +45,7 @@ | |||
|
|||
it 'Execute ACL Manifest' do | |||
# exit code 2: The run succeeded, and some resources were changed. | |||
on(agent, puppet('apply', '--detailed-exitcodes'), stdin: acl_manifest, acceptable_exit_codes: [2]) do |result| | |||
execute_manifest_on(agent, acl_manifest, { :catch_changes => true }) do |result| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should possibly be :expect_changes
@@ -59,7 +59,7 @@ | |||
end | |||
|
|||
it 'Execute ACL Manifest again' do | |||
on(agent, puppet('apply'), stdin: acl_manifest, acceptable_exit_codes: [0]) do |result| | |||
execute_manifest_on(agent, acl_manifest, { :catch_failures => true } ) do |result| |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should possibly be :catch_changes
This commit updates all host execution methods to execute_manifest_on methods. Where applicable, it changes explicit exitcode calls to catch_failures or catch_changes
jpogran
force-pushed
the
MODULES-6739-add-testmode
branch
from
March 20, 2018 17:12
781d34d
to
6f84173
Compare
michaeltlombardi
approved these changes
Mar 20, 2018
This has passed adhoc |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This updates the acl module to use testmode switcher instead of direct agent calls.
Only places where a manifest was executed were methods changed (i.e.
on(
toexecute_manifest
orexecute_manifest_on
).Outputting
debug
messages were maintained by settingdebug => true
option.In some cases where specific exit codes were tracked, the following reference was followed: https://github.com/puppetlabs/beaker-testmode_switcher/blob/f91829ee5fddd04b633ea8d531485e5f0f7cc996/lib/beaker/testmode_switcher/runner_base.rb#L19-L22