From 0b1ff0c6c82e096332df786d874c265fe35bc3c4 Mon Sep 17 00:00:00 2001 From: Evgeni Golov Date: Mon, 8 Jul 2024 13:05:56 +0200 Subject: [PATCH] use facts[:os]['family'] instead of facts[:osfamily] in tests --- puppet/spec/classes/jenkins_node_spec.rb | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/puppet/spec/classes/jenkins_node_spec.rb b/puppet/spec/classes/jenkins_node_spec.rb index 75030d15f..0cace568e 100644 --- a/puppet/spec/classes/jenkins_node_spec.rb +++ b/puppet/spec/classes/jenkins_node_spec.rb @@ -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') } @@ -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}