From ab39c8f7c3c9bf5dbd4436cad8ccce21263fe646 Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Sun, 14 Feb 2021 08:22:55 +0000 Subject: [PATCH] test(config): fix for Amazon Linux 2 & Oracle Linux 7/8 --- test/integration/default/controls/config.rb | 8 ++++---- test/integration/default/controls/service.rb | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/test/integration/default/controls/config.rb b/test/integration/default/controls/config.rb index fb7d69c..a01ef3b 100644 --- a/test/integration/default/controls/config.rb +++ b/test/integration/default/controls/config.rb @@ -3,12 +3,12 @@ server_available = '/etc/nginx/sites-available' server_enabled = '/etc/nginx/sites-enabled' -# Override by OS -case os[:name] -when 'redhat', 'centos', 'fedora' +# Override by platform family +case platform[:family] +when 'redhat','fedora' server_available = '/etc/nginx/conf.d' server_enabled = '/etc/nginx/conf.d' -when 'opensuse' +when 'suse' server_available = '/etc/nginx/vhosts.d' server_enabled = '/etc/nginx/vhosts.d' end diff --git a/test/integration/default/controls/service.rb b/test/integration/default/controls/service.rb index 5dad48c..c979d24 100644 --- a/test/integration/default/controls/service.rb +++ b/test/integration/default/controls/service.rb @@ -2,6 +2,7 @@ control 'Nginx service' do title 'should be running and enabled' describe service('nginx') do + it { should be_installed } it { should be_enabled } it { should be_running } end