Skip to content
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
merged 2 commits into from
Mar 20, 2018

Conversation

jpogran
Copy link
Contributor

@jpogran jpogran commented Mar 5, 2018

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( to execute_manifest or execute_manifest_on).

Outputting debug messages were maintained by setting debug => 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

@jpogran jpogran force-pushed the MODULES-6739-add-testmode branch 8 times, most recently from 9812e83 to d8b99a2 Compare March 6, 2018 18:47
@jpogran jpogran force-pushed the MODULES-6739-add-testmode branch 8 times, most recently from 15eec0e to 3f2170a Compare March 16, 2018 18:28
This commit adds the necessary entries to the acceptance setup in order
for testmode switcher to work.
@jpogran jpogran force-pushed the MODULES-6739-add-testmode branch 2 times, most recently from 36613ec to 4070eae Compare March 16, 2018 18:46
@jpogran jpogran changed the title (WIP)(MODULES-6739) Add Testmode switcher (MODULES-6739) Add Testmode switcher Mar 19, 2018
@jpogran jpogran force-pushed the MODULES-6739-add-testmode branch 2 times, most recently from 5784ac6 to 781d34d Compare March 19, 2018 16:04
@@ -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|
Copy link
Contributor

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|
Copy link
Contributor

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 jpogran force-pushed the MODULES-6739-add-testmode branch from 781d34d to 6f84173 Compare March 20, 2018 17:12
@jpogran
Copy link
Contributor Author

jpogran commented Mar 20, 2018

This has passed adhoc

@michaeltlombardi michaeltlombardi merged commit 5476fdc into puppetlabs:master Mar 20, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants