2020-03-21 00:46:45 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2020-06-11 03:21:18 +02:00
|
|
|
services =
|
2021-03-30 12:55:03 +02:00
|
|
|
case system.platform[:family]
|
|
|
|
when 'bsd'
|
|
|
|
%w[salt_master salt_minion]
|
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 services' do
|
|
|
|
title 'should be running'
|
|
|
|
|
2020-06-11 03:21:18 +02:00
|
|
|
services.each do |p|
|
2020-03-21 00:46:45 +01:00
|
|
|
describe service(p) do
|
2020-04-02 00:22:05 +02:00
|
|
|
it { should be_installed }
|
2020-03-21 00:46:45 +01:00
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|