cron-formula/test/integration/default/controls/service_spec.rb

27 lines
494 B
Ruby
Raw Normal View History

# frozen_string_literal: true
2019-08-27 23:35:25 +02:00
control 'Cron service' do
title 'should be running and enabled'
service_name =
case os[:family]
when 'debian', 'suse'
'cron'
2019-10-14 17:05:24 +02:00
# Catch remaining `linux` platforms to identify by `name` at the end
when 'linux'
case os[:name]
when 'arch'
'cronie'
else
'crond'
end
2019-08-27 23:35:25 +02:00
else
'crond'
end
describe service(service_name) do
it { should be_enabled }
it { should be_running }
end
end