Skip to content

Commit

Permalink
use facts[:os]['family'] instead of facts[:osfamily] in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
evgeni committed Jul 9, 2024
1 parent 7331bdf commit 0b1ff0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions puppet/spec/classes/jenkins_node_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
end
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_users__account('jenkins').with_sudo(false) }
if facts[:osfamily] == 'Debian'
if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_class('sudo') }
it { is_expected.to contain_sudo__conf('sudo-puppet-jenkins').with_content('jenkins ALL=NOPASSWD: ALL') }
else
it { is_expected.not_to contain_class('sudo') }
end

if facts[:osfamily] == 'Debian'
if facts[:os]['family'] == 'Debian'
it { is_expected.to contain_file('/etc/pbuilder/bullseye64/hooks/A10nozstd').with_ensure('absent') }
it { is_expected.to contain_file('/etc/pbuilder/jammy64/hooks/A10nozstd').with_ensure('present') }
it { is_expected.to contain_file('/etc/pbuilder/bullseye64/hooks/C10foremanlog').with_ensure('present') }
Expand Down Expand Up @@ -49,7 +49,7 @@
it { is_expected.to contain_package('jq') }
end

if facts[:osfamily] == 'RedHat'
if facts[:os]['family'] == 'RedHat'
context "unittest only node" do
let(:params) do
{uploader: false, packaging: false, unittests: true}
Expand Down

0 comments on commit 0b1ff0c

Please sign in to comment.