2020-03-21 00:46:45 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
version =
|
|
|
|
case platform[:family]
|
|
|
|
when 'redhat'
|
|
|
|
case platform[:name]
|
|
|
|
when 'amazon'
|
2020-04-01 23:57:25 +02:00
|
|
|
'3000.1-1.amzn2'
|
2020-03-21 00:46:45 +01:00
|
|
|
when 'centos'
|
2020-04-01 23:57:25 +02:00
|
|
|
'3000.1-1.el8'
|
2020-03-21 00:46:45 +01:00
|
|
|
end
|
|
|
|
when 'fedora'
|
2020-04-18 12:43:59 +02:00
|
|
|
'3000.1-1.fc31'
|
2020-03-21 00:46:45 +01:00
|
|
|
when 'suse'
|
|
|
|
'3000-lp151.28.1'
|
|
|
|
when 'debian'
|
2020-04-01 23:57:25 +02:00
|
|
|
'3000.1+ds-1'
|
2020-03-21 00:46:45 +01:00
|
|
|
end
|
|
|
|
|
|
|
|
control 'salt packages' do
|
|
|
|
title 'should be installed'
|
|
|
|
|
|
|
|
%w[
|
|
|
|
salt-master
|
|
|
|
salt-minion
|
|
|
|
].each do |p|
|
|
|
|
describe package(p) do
|
|
|
|
it { should be_installed }
|
|
|
|
its('version') { should eq version }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|