2
0

test: update for new platforms (inc. using system library)

This commit is contained in:
Imran Iqbal 2021-03-30 11:55:03 +01:00
parent 61201de8c6
commit e6bcdc1b4d
No known key found for this signature in database
GPG Key ID: 6D8629439D2B7819
8 changed files with 80 additions and 26 deletions

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true # frozen_string_literal: true
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
control 'salt packages' do control 'salt packages' do
title 'should be installed' title 'should be installed'
version = '3000' version = '3000'
%w[ pkgs.each do |p|
salt-master
salt-minion
].each do |p|
describe package(p) do describe package(p) do
it { should be_installed } it { should be_installed }
its('version') { should match(/^#{version}/) } its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true # frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do control 'salt services' do
title 'should be running' title 'should be running'
%w[ services.each do |p|
salt-master
salt-minion
].each do |p|
describe service(p) do describe service(p) do
it { should be_installed } it { should be_installed }
it { should be_enabled } it { should be_enabled }

View File

@ -1,7 +1,11 @@
# frozen_string_literal: true # frozen_string_literal: true
pkgs = pkgs =
case platform[:family] case system.platform[:name]
when 'arch'
%w[salt]
when /bsd$/
%w[py37-salt-3002.6]
when 'windows' when 'windows'
%w[Salt\ Minion] %w[Salt\ Minion]
else else

View File

@ -1,7 +1,9 @@
# frozen_string_literal: true # frozen_string_literal: true
services = services =
case platform[:family] case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows' when 'windows'
%w[salt-minion] %w[salt-minion]
else else

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true # frozen_string_literal: true
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
control 'salt packages' do control 'salt packages' do
title 'should be installed' title 'should be installed'
version = '3001' version = '3001'
%w[ pkgs.each do |p|
salt-master
salt-minion
].each do |p|
describe package(p) do describe package(p) do
it { should be_installed } it { should be_installed }
its('version') { should match(/^#{version}/) } its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true # frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do control 'salt services' do
title 'should be running' title 'should be running'
%w[ services.each do |p|
salt-master
salt-minion
].each do |p|
describe service(p) do describe service(p) do
it { should be_installed } it { should be_installed }
it { should be_enabled } it { should be_enabled }

View File

@ -1,14 +1,23 @@
# frozen_string_literal: true # frozen_string_literal: true
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
control 'salt packages' do control 'salt packages' do
title 'should be installed' title 'should be installed'
version = '3002' version = '3002'
%w[ pkgs.each do |p|
salt-master
salt-minion
].each do |p|
describe package(p) do describe package(p) do
it { should be_installed } it { should be_installed }
its('version') { should match(/^#{version}/) } its('version') { should match(/^#{version}/) }

View File

@ -1,12 +1,19 @@
# frozen_string_literal: true # frozen_string_literal: true
services =
case system.platform[:family]
when 'bsd'
%w[salt_master salt_minion]
when 'windows'
%w[salt-minion]
else
%w[salt-master salt-minion]
end
control 'salt services' do control 'salt services' do
title 'should be running' title 'should be running'
%w[ services.each do |p|
salt-master
salt-minion
].each do |p|
describe service(p) do describe service(p) do
it { should be_installed } it { should be_installed }
it { should be_enabled } it { should be_enabled }