Skip to content

Commit

Permalink
Switch to FacterDB 3 / drop legacy facts
Browse files Browse the repository at this point in the history
Version 3 of FacterDB drops support for legacy facts.
  • Loading branch information
bastelfreak committed Jun 14, 2024
1 parent 24082b0 commit d4401b8
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion rspec-puppet-facts.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,6 @@ Gem::Specification.new do |s|

s.add_runtime_dependency 'deep_merge', '~> 1.2'
s.add_runtime_dependency 'facter', '< 5'
s.add_runtime_dependency 'facterdb', '~> 2.1'
s.add_runtime_dependency 'facterdb', '~> 3.1'
s.add_runtime_dependency 'puppet', '>= 7', '< 9'
end
1 change: 0 additions & 1 deletion spec/fixtures/metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"7",
"8",
"9"
]
Expand Down
4 changes: 1 addition & 3 deletions spec/rspec_puppet_facts_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,6 @@
expect(subject.keys).to contain_exactly(
'debian-11-x86_64',
'debian-12-x86_64',
'redhat-7-x86_64',
'redhat-8-x86_64',
'redhat-9-x86_64',
)
Expand All @@ -224,7 +223,6 @@
it 'is able to filter the received OS facts' do
allow(described_class).to receive(:spec_facts_os_filter).and_return('redhat')
expect(subject.keys).to contain_exactly(
'redhat-7-x86_64',
'redhat-8-x86_64',
'redhat-9-x86_64',
)
Expand Down Expand Up @@ -319,7 +317,7 @@
end

it 'returns a fact set for the specified release' do
expect(factsets).to match('redhat-9-x86_64' => include(operatingsystemmajrelease: '9'))
expect(factsets['redhat-9-x86_64'][:os]['release']['major']).to eql('9')
end
end

Expand Down

0 comments on commit d4401b8

Please sign in to comment.