-
Notifications
You must be signed in to change notification settings - Fork 289
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
Support Puppet 7 #1288
Support Puppet 7 #1288
Conversation
4e6e834
to
3451a12
Compare
Modified pull request to only add Puppet 7 support. |
f689bbc
to
d7b4d65
Compare
@@ -3,6 +3,15 @@ | |||
describe 'sensu::backend class', if: ['base','full'].include?(RSpec.configuration.sensu_mode) do | |||
backend = hosts_as('sensu-backend')[0] | |||
agent = hosts_as('sensu-agent')[0] | |||
let(:facter_command) do |
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.
This code is getting duplicated. To DRY things up, could it be moved to the spec_helper?
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.
Not really. It's best to define variables in rspec using let
to ensure proper test isolation and not a great way to do that in central place that I know of. It's also slightly differen logic for Windows tests than other tests so not much to DRY up.
Pull Request Checklist
Description
Add support for Puppet 7 (and Facter 4)
I did not use Ruby 2.7.0 for acceptance tests because the RVM version of Ruby used for beaker tests has zero impact on the tests, the version of Ruby and Puppet used for the test is set by
BEAKER_PUPPET_COLLECTION
so you can use whatever version of Ruby is supported by the beaker code and it won't impact the version of Ruby used for actual acceptance tests. The beaker library is not yet validated on Ruby 2.7 so I opted for safest approach while still testing proper version of Puppet and Ruby inside Docker. It's sort of like installing RVM Ruby 2.0.0 on a host and it having no impact on Puppet Ruby because Puppet Ruby is embedded in the puppet-agent package, and the beaker tests are using puppet-agent packages.