test(config): fix for Amazon Linux 2 & Oracle Linux 7/8
This commit is contained in:
parent
ae6375cccc
commit
ab39c8f7c3
@ -3,12 +3,12 @@
|
|||||||
server_available = '/etc/nginx/sites-available'
|
server_available = '/etc/nginx/sites-available'
|
||||||
server_enabled = '/etc/nginx/sites-enabled'
|
server_enabled = '/etc/nginx/sites-enabled'
|
||||||
|
|
||||||
# Override by OS
|
# Override by platform family
|
||||||
case os[:name]
|
case platform[:family]
|
||||||
when 'redhat', 'centos', 'fedora'
|
when 'redhat','fedora'
|
||||||
server_available = '/etc/nginx/conf.d'
|
server_available = '/etc/nginx/conf.d'
|
||||||
server_enabled = '/etc/nginx/conf.d'
|
server_enabled = '/etc/nginx/conf.d'
|
||||||
when 'opensuse'
|
when 'suse'
|
||||||
server_available = '/etc/nginx/vhosts.d'
|
server_available = '/etc/nginx/vhosts.d'
|
||||||
server_enabled = '/etc/nginx/vhosts.d'
|
server_enabled = '/etc/nginx/vhosts.d'
|
||||||
end
|
end
|
||||||
|
@ -2,6 +2,7 @@ control 'Nginx service' do
|
|||||||
title 'should be running and enabled'
|
title 'should be running and enabled'
|
||||||
|
|
||||||
describe service('nginx') do
|
describe service('nginx') do
|
||||||
|
it { should be_installed }
|
||||||
it { should be_enabled }
|
it { should be_enabled }
|
||||||
it { should be_running }
|
it { should be_running }
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user