-
Notifications
You must be signed in to change notification settings - Fork 6
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
Adjust Puppet settings to match Puppet 8 defaults #92
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,16 @@ | |
end | ||
end | ||
|
||
# Puppet 8 remove Legacy Facts and enable Strict Mode: | ||
# https://github.com/puppetlabs/puppet/wiki/Puppet-8-Compatibility#legacy-facts | ||
# https://github.com/puppetlabs/puppet/wiki/Puppet-8-Compatibility#strict-mode | ||
# | ||
# We want to use these settings as a common denominator for all versions of | ||
# Puppet with test modules against. | ||
Puppet[:include_legacy_facts] = false | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Will this work on Puppet 6 as well? Can you maybe raise a PR against puppet-example that tests this? |
||
Puppet[:strict_variables] = true | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. You should configure this via rspec-puppet: https://github.com/puppetlabs/rspec-puppet#strict_variables There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think strict_variables and strict is already set somewhere, maybe in puppetlabs_spec_helper. Setting it here probably won't hurt. |
||
Puppet[:strict] = :error | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This setting doesn't appear to exist in rspec-puppet. |
||
|
||
if ENV['DEBUG'] | ||
Puppet::Util::Log.level = :debug | ||
Puppet::Util::Log.newdestination(:console) | ||
|
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.
I don't think this works with rspec-puppet-facts. See puppetlabs/rspec-puppet#41 as well.