test(packages_spec): prevent control for `bsd` family
* Refactor `package_name` using `case` like other formulas
This commit is contained in:
parent
7257adefee
commit
fe1af098b3
|
@ -1,12 +1,19 @@
|
||||||
# Overide by Platform
|
# Overide by Platform
|
||||||
package_name = 'openssh-server'
|
package_name =
|
||||||
if platform[:family] == 'suse'
|
case platform[:family]
|
||||||
package_name = 'openssh'
|
when 'suse'
|
||||||
|
'openssh'
|
||||||
|
else
|
||||||
|
'openssh-server'
|
||||||
end
|
end
|
||||||
|
|
||||||
control 'openssh package' do
|
control 'openssh package' do
|
||||||
title 'should be installed'
|
title 'should be installed'
|
||||||
|
|
||||||
|
only_if do
|
||||||
|
platform.family != 'bsd'
|
||||||
|
end
|
||||||
|
|
||||||
describe package(package_name) do
|
describe package(package_name) do
|
||||||
it { should be_installed }
|
it { should be_installed }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue