2020-06-23 09:44:08 +02:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
services =
|
|
|
|
case system.platform[:family]
|
|
|
|
when 'bsd'
|
|
|
|
%w[salt_master salt_minion]
|
|
|
|
when 'windows'
|
|
|
|
%w[salt-minion]
|
2022-05-17 08:39:37 +02:00
|
|
|
when 'darwin'
|
|
|
|
# The following is expected but isn't yet working in the GitHub Actions
|
|
|
|
# macOS runners
|
|
|
|
# %w[com.saltstack.salt.api
|
|
|
|
# com.saltstack.salt.master
|
|
|
|
# com.saltstack.salt.minion
|
|
|
|
# com.saltstack.salt.syndic]
|
|
|
|
[]
|
2021-03-30 12:55:03 +02:00
|
|
|
else
|
|
|
|
%w[salt-master salt-minion]
|
|
|
|
end
|
|
|
|
|
2020-06-23 09:44:08 +02:00
|
|
|
control 'salt services' do
|
|
|
|
title 'should be running'
|
|
|
|
|
2021-03-30 12:55:03 +02:00
|
|
|
services.each do |p|
|
2020-06-23 09:44:08 +02:00
|
|
|
describe service(p) do
|
|
|
|
it { should be_installed }
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|