Skip to content

Commit d642657

Browse files
mmollekohl
authored andcommitted
fix tests after ensure_packages changed (theforeman#356)
see puppetlabs/puppetlabs-stdlib#716 (MODULES-4377)
1 parent 977fabd commit d642657

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

manifests/tftp.pp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@
8282
}
8383
}
8484

85-
ensure_packages($grub_packages, { ensure => 'installed', })
85+
ensure_packages($grub_packages, { ensure => 'present', })
8686

8787
case $grub_type {
8888
'redhat': {

spec/classes/foreman_proxy__tftp_spec.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@
8989
end
9090

9191
if facts[:osfamily] == 'Debian'
92-
it { should contain_package('grub-common').with_ensure('installed') }
93-
it { should contain_package('grub-efi-amd64-bin').with_ensure('installed') }
92+
it { should contain_package('grub-common').with_ensure('present') }
93+
it { should contain_package('grub-efi-amd64-bin').with_ensure('present') }
9494

9595
tftp_root = case facts[:operatingsystem]
9696
when 'Ubuntu'
@@ -108,10 +108,10 @@
108108
it { should contain_file("#{tftp_root}/grub2/shim.efi").with_ensure('link') }
109109
elsif facts[:osfamily] == 'RedHat'
110110
if facts[:operatingsystemmajrelease].to_i > 6
111-
it { should contain_package('grub2-efi').with_ensure('installed') }
112-
it { should contain_package('grub2-efi-modules').with_ensure('installed') }
113-
it { should contain_package('grub2-tools').with_ensure('installed') }
114-
it { should contain_package('shim').with_ensure('installed') }
111+
it { should contain_package('grub2-efi').with_ensure('present') }
112+
it { should contain_package('grub2-efi-modules').with_ensure('present') }
113+
it { should contain_package('grub2-tools').with_ensure('present') }
114+
it { should contain_package('shim').with_ensure('present') }
115115

116116
case facts[:operatingsystem]
117117
when /^(RedHat|Scientific|OracleLinux)$/
@@ -125,7 +125,7 @@
125125
it { should contain_file("#{tftp_root}/grub2/shim.efi").with_source('/boot/efi/EFI/centos/shim.efi') }
126126
end
127127
else
128-
it { should contain_package('grub').with_ensure('installed') }
128+
it { should contain_package('grub').with_ensure('present') }
129129
it { should contain_file('/var/lib/tftpboot/grub/grubx64.efi').with_ensure('file').with_owner('root').with_mode('0644').with_source('/boot/efi/EFI/redhat/grub.efi') }
130130
it { should contain_file('/var/lib/tftpboot/grub/shim.efi').with_ensure('link') }
131131
end

0 commit comments

Comments
 (0)