Selaa lähdekoodia
test(packages_spec): prevent control for `bsd` family
* Refactor `package_name` using `case` like other formulas
tags/v0.43.1
Imran Iqbal
4 vuotta sitten
vanhempi
commit
fe1af098b3
No account linked to committer's email address
1 muutettua tiedostoa jossa
11 lisäystä ja
4 poistoa
-
test/integration/default/controls/packages_spec.rb
|
|
@@ -1,12 +1,19 @@ |
|
|
|
# Overide by Platform |
|
|
|
package_name = 'openssh-server' |
|
|
|
if platform[:family] == 'suse' |
|
|
|
package_name = 'openssh' |
|
|
|
end |
|
|
|
package_name = |
|
|
|
case platform[:family] |
|
|
|
when 'suse' |
|
|
|
'openssh' |
|
|
|
else |
|
|
|
'openssh-server' |
|
|
|
end |
|
|
|
|
|
|
|
control 'openssh package' do |
|
|
|
title 'should be installed' |
|
|
|
|
|
|
|
only_if do |
|
|
|
platform.family != 'bsd' |
|
|
|
end |
|
|
|
|
|
|
|
describe package(package_name) do |
|
|
|
it { should be_installed } |
|
|
|
end |