Ver código fonte

test(packages_spec): prevent control for `bsd` family

* Refactor `package_name` using `case` like other formulas
tags/v0.43.1
Imran Iqbal 4 anos atrás
pai
commit
fe1af098b3
Nenhuma conta vinculada ao e-mail do autor do commit
1 arquivos alterados com 11 adições e 4 exclusões
  1. +11
    -4
      test/integration/default/controls/packages_spec.rb

+ 11
- 4
test/integration/default/controls/packages_spec.rb Ver arquivo

@@ -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

Carregando…
Cancelar
Salvar