Skip to content

Commit 582d863

Browse files
(CAT-2385) Correct legacy fact references
1 parent 6ea7042 commit 582d863

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

spec/spec_helper_local.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ def param(type, title, param)
154154
# grep defaultfor lib/puppet/provider/service/*.rb
155155
# See https://github.com/voxpupuli/voxpupuli-test/blob/master/lib/voxpupuli/test/facts.rb
156156
add_custom_fact :service_provider, ->(_os, facts) do
157-
case facts[:osfamily].downcase
157+
case facts[:os]['family'].downcase
158158
when 'archlinux', 'debian'
159159
'systemd'
160160
when 'darwin'
@@ -166,9 +166,9 @@ def param(type, title, param)
166166
when 'openbsd'
167167
'openbsd'
168168
when 'redhat'
169-
(facts[:operatingsystemrelease].to_i >= 7) ? 'systemd' : 'redhat'
169+
(facts[:os]['release']['full'].to_i >= 7) ? 'systemd' : 'redhat'
170170
when 'suse'
171-
(facts[:operatingsystemmajrelease].to_i >= 12) ? 'systemd' : 'redhat'
171+
(facts[:os]['release']['major'].to_i >= 12) ? 'systemd' : 'redhat'
172172
when 'windows'
173173
'windows'
174174
else

0 commit comments

Comments
 (0)