2020-03-21 00:46:45 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-06-11 03:21:18 +02:00
|
|
|
pkgs =
|
2021-03-30 12:55:03 +02:00
|
|
|
case system.platform[:name]
|
|
|
|
when 'arch'
|
|
|
|
%w[salt]
|
|
|
|
when /bsd$/
|
|
|
|
%w[py37-salt-3002.6]
|
2020-06-11 03:21:18 +02:00
|
|
|
when 'windows'
|
|
|
|
%w[Salt\ Minion]
|
|
|
|
else
|
|
|
|
%w[salt-master salt-minion]
|
|
|
|
end
|
|
|
|
|
2020-03-21 00:46:45 +01:00
|
|
|
control 'salt packages' do
|
|
|
|
title 'should be installed'
|
|
|
|
|
2020-12-14 20:56:26 +01:00
|
|
|
version = '3000'
|
2020-05-31 23:59:26 +02:00
|
|
|
|
2020-06-11 03:21:18 +02:00
|
|
|
pkgs.each do |p|
|
2020-03-21 00:46:45 +01:00
|
|
|
describe package(p) do
|
|
|
|
it { should be_installed }
|
2020-05-31 23:59:26 +02:00
|
|
|
its('version') { should match(/^#{version}/) }
|
2020-03-21 00:46:45 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|