inspec/test/integration/default/package_spec.rb

31 lines
625 B
Ruby
Raw Normal View History

2015-10-22 17:55:42 +00:00
# encoding: utf-8
2015-12-21 17:58:56 +00:00
case os[:family]
when 'centos', 'fedora', 'opensuse', 'debian', 'ubuntu'
2015-10-22 17:55:42 +00:00
describe package('curl') do
it { should be_installed }
end
2015-12-21 17:58:56 +00:00
when 'aix'
describe package('bos.rte') do
it { should be_installed }
2016-01-06 17:13:32 +00:00
its('version') { should match /^(6|7)[.|\d]+\d$/ }
2015-10-22 17:55:42 +00:00
end
2016-01-28 13:51:54 +00:00
when 'solaris'
if os[:release] == '11'
pkg = 'system/file-system/zfs'
ver = /^0\.5.+$/
else
pkg = 'SUNWzfsr'
ver = /^11\.10.+$/
end
describe package(pkg) do
it { should be_installed }
its('version') { should match ver }
end
2015-10-22 17:55:42 +00:00
end
2015-12-21 17:58:56 +00:00
describe package('nginx') do
it { should_not be_installed }
end