瀏覽代碼

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

* Refactor `package_name` using `case` like other formulas
tags/v0.43.1
Imran Iqbal 4 年之前
父節點
當前提交
fe1af098b3
沒有連結到貢獻者的電子郵件帳戶。
共有 1 個檔案被更改,包括 11 行新增4 行删除
  1. +11
    -4
      test/integration/default/controls/packages_spec.rb

+ 11
- 4
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

Loading…
取消
儲存