Skip to content

Commit 4eda936

Browse files
committed
Switch to FacterDB 3 / drop legacy facts
Version 3 of FacterDB drops support for legacy facts.
1 parent 24082b0 commit 4eda936

File tree

3 files changed

+2
-5
lines changed

3 files changed

+2
-5
lines changed

rspec-puppet-facts.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ Gem::Specification.new do |s|
2727

2828
s.add_runtime_dependency 'deep_merge', '~> 1.2'
2929
s.add_runtime_dependency 'facter', '< 5'
30-
s.add_runtime_dependency 'facterdb', '~> 2.1'
30+
s.add_runtime_dependency 'facterdb', '~> 3.1'
3131
s.add_runtime_dependency 'puppet', '>= 7', '< 9'
3232
end

spec/fixtures/metadata.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
{
2323
"operatingsystem": "RedHat",
2424
"operatingsystemrelease": [
25-
"7",
2625
"8",
2726
"9"
2827
]

spec/rspec_puppet_facts_spec.rb

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@
215215
expect(subject.keys).to contain_exactly(
216216
'debian-11-x86_64',
217217
'debian-12-x86_64',
218-
'redhat-7-x86_64',
219218
'redhat-8-x86_64',
220219
'redhat-9-x86_64',
221220
)
@@ -224,7 +223,6 @@
224223
it 'is able to filter the received OS facts' do
225224
allow(described_class).to receive(:spec_facts_os_filter).and_return('redhat')
226225
expect(subject.keys).to contain_exactly(
227-
'redhat-7-x86_64',
228226
'redhat-8-x86_64',
229227
'redhat-9-x86_64',
230228
)
@@ -319,7 +317,7 @@
319317
end
320318

321319
it 'returns a fact set for the specified release' do
322-
expect(factsets).to match('redhat-9-x86_64' => include(operatingsystemmajrelease: '9'))
320+
expect(factsets).to a_hash_including('redhat-9-x86_64' => hash_including({ os: hash_including({ 'release' => hash_including({ 'major' => '9' }) }) }))
323321
end
324322
end
325323

0 commit comments

Comments
 (0)