-
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
rspec-puppet-facts: Require 4.x; add custom facts as strings #135
Conversation
os: {'family' => 'RedHat', 'release' => { 'major' => '6' }} | ||
}) | ||
expect(facts['systemd']).to be false | ||
expect(facts[:systemd]).to be true |
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 understand that those are symbols, because we don't set RSpec.config.facterdb_string_keys = true
. But why was it a string in the past? The code adds the custom fact as symbol:
add_custom_fact :service_provider, ->(_os, facts) do
also the stdlib facts below are tested as a symbol and work now and worked before 🤔
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 think this changedin rspec-puppet-facts 3. Previously the custom facts were always strings, now they honour stringify_facts
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.
If we can switch the custom facts someone back to strings we could make this a minor release. But if we do a major release that's not too bad as well. We don't use the systemd fact at all in our unit tests for facts, it just requires a new modulesync.
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.
Okay I think we should do a major release
end | ||
|
||
it 'has no systemd on openbsd' do | ||
add_facts_for_metadata(metadata) | ||
facts = RspecPuppetFacts.with_custom_facts('openbsd-6.4-x86_64', { | ||
facts = RspecPuppetFacts.with_custom_facts('openbsd-7-x86_64', { |
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.
updating because openbsd 6.4 is gone from facterdb.
This basically drops factsets for facter 1, 2 and 3. So it drops support for Puppet 6 and older. However, we don't support those anymore in our modules, so this isn't a breaking change.
The newer FacterDB release also drop support for some operating systems that were EoL as well.