2020-12-22 15:42:11 +01:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2019-09-04 01:12:38 +02:00
|
|
|
control 'Php service' do
|
|
|
|
title 'should be running and enabled'
|
|
|
|
|
|
|
|
def test_debian
|
|
|
|
describe service('php5.6-fpm') do
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
|
|
|
|
describe service('php7.3-fpm') do
|
|
|
|
it { should be_enabled }
|
|
|
|
it { should be_running }
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2020-12-22 15:42:11 +01:00
|
|
|
def test_redhat; end
|
2019-09-04 01:12:38 +02:00
|
|
|
|
2020-12-22 15:42:11 +01:00
|
|
|
def test_suse; end
|
2019-09-04 01:12:38 +02:00
|
|
|
|
2021-03-31 10:15:11 +02:00
|
|
|
def test_bsd; end
|
|
|
|
|
2019-09-04 01:12:38 +02:00
|
|
|
case os[:family]
|
|
|
|
when 'debian'
|
2019-09-04 02:58:06 +02:00
|
|
|
test_debian
|
2019-09-04 01:12:38 +02:00
|
|
|
when 'redhat', 'fedora'
|
|
|
|
test_redhat
|
|
|
|
when 'suse'
|
|
|
|
test_suse
|
2021-03-31 10:15:11 +02:00
|
|
|
when 'bsd'
|
|
|
|
test_bsd
|
2019-09-04 01:12:38 +02:00
|
|
|
end
|
|
|
|
end
|