2
0
salt-formula/test/integration/default/controls/pkgs_spec.rb
Imran Iqbal b475e24638
test: centralise all suites into default suite
Modify the `default` suite to use the `saltmajorversion` InSpec input
rather than the `version` variable in `pkgs_spec.rb`.
2021-11-17 21:53:19 +00:00

25 lines
436 B
Ruby

# frozen_string_literal: true
pkgs =
case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py38-salt]
when 'windows'
['Salt Minion']
else
%w[salt-master salt-minion]
end
control 'salt packages' do
title 'should be installed'
pkgs.each do |p|
describe package(p) do
it { should be_installed }
its('version') { should match(/^#{input('saltmajorversion')}/) }
end
end
end