2020-06-23 09:44:08 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
pkgs =
|
|
|
|
case system.platform[:name]
|
|
|
|
when 'arch'
|
|
|
|
%w[salt]
|
|
|
|
when /bsd$/
|
|
|
|
%w[py37-salt-3002.6]
|
|
|
|
when 'windows'
|
|
|
|
%w[Salt\ Minion]
|
|
|
|
else
|
|
|
|
%w[salt-master salt-minion]
|
|
|
|
end
|
|
|
|
|
2020-06-23 09:44:08 +02:00
|
|
|
control 'salt packages' do
|
|
|
|
title 'should be installed'
|
|
|
|
|
|
|
|
version = '3001'
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
pkgs.each do |p|
|
2020-06-23 09:44:08 +02:00
|
|
|
describe package(p) do
|
|
|
|
it { should be_installed }
|
|
|
|
its('version') { should match(/^#{version}/) }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|