mirror of
https://github.com/saltstack-formulas/salt-formula.git
synced 2026-10-24 14:14:17 +02:00
test(pkgs_spec): simplify using match (trigger: update for suse)
* https://travis-ci.org/github/myii/salt-formula/jobs/692337807#L2366-L2381 - `opensuse` now has `3000.3` available * Simplification is useful anyway, even without this (could still use `case`)
This commit is contained in:
4 files changed
+12
-76
No files matched your search
@@ -1,21 +1,17 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
version =
|
||||
case platform[:family]
|
||||
when 'debian'
|
||||
'3000.3+ds-1'
|
||||
end
|
||||
|
||||
control 'salt packages' do
|
||||
title 'should be installed'
|
||||
|
||||
version = '3000.3'
|
||||
|
||||
%w[
|
||||
salt-master
|
||||
salt-minion
|
||||
].each do |p|
|
||||
describe package(p) do
|
||||
it { should be_installed }
|
||||
its('version') { should eq version }
|
||||
its('version') { should match(/^#{version}/) }
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user