diff --git a/metadata.json b/metadata.json
index b75d340784..ea786eacde 100644
--- a/metadata.json
+++ b/metadata.json
@@ -21,7 +21,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
- "6",
"7",
"8",
"9"
@@ -37,14 +36,12 @@
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
- "6",
"7"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
- "6",
"7"
]
},
diff --git a/spec/classes/apache_spec.rb b/spec/classes/apache_spec.rb
index dc27f1e5e3..4d392a1384 100644
--- a/spec/classes/apache_spec.rb
+++ b/spec/classes/apache_spec.rb
@@ -725,7 +725,7 @@
}
end
context 'on all OSes' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'with a custom apache_name parameter' do
let :params do
diff --git a/spec/classes/mod/alias_spec.rb b/spec/classes/mod/alias_spec.rb
index 94f7bcc3b5..38d4207739 100644
--- a/spec/classes/mod/alias_spec.rb
+++ b/spec/classes/mod/alias_spec.rb
@@ -12,12 +12,6 @@
it { is_expected.to contain_apache__mod('alias') }
it { is_expected.to contain_file('alias.conf').with(content: %r{Alias \/icons\/ "\/usr\/share\/apache2\/icons\/"}) }
end
- context 'on a RedHat 6-based OS', :compile do
- include_examples 'RedHat 6'
-
- it { is_expected.to contain_apache__mod('alias') }
- it { is_expected.to contain_file('alias.conf').with(content: %r{Alias \/icons\/ "\/var\/www\/icons\/"}) }
- end
context 'on a RedHat 7-based OS', :compile do
include_examples 'RedHat 7'
diff --git a/spec/classes/mod/auth_cas_spec.rb b/spec/classes/mod/auth_cas_spec.rb
index 720999f816..9d615e5a10 100644
--- a/spec/classes/mod/auth_cas_spec.rb
+++ b/spec/classes/mod/auth_cas_spec.rb
@@ -38,13 +38,13 @@
it { is_expected.to contain_file('auth_cas.conf').with_content(%r{CASIdleTimeout 4321}) }
end
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_class('apache::mod::authn_core') }
it { is_expected.to contain_apache__mod('auth_cas') }
it { is_expected.to contain_package('mod_auth_cas') }
- it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.d/auth_cas.conf') }
+ it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.modules.d/auth_cas.conf') }
it { is_expected.to contain_file('/var/cache/mod_auth_cas/').with_owner('apache') }
it { is_expected.to contain_file('auth_cas.conf').with_content(%r{CASTimeout 1234}) }
it { is_expected.to contain_file('auth_cas.conf').with_content(%r{CASIdleTimeout 4321}) }
@@ -55,13 +55,13 @@
"class { 'apache': } apache::vhost { 'test.server': docroot => '/var/www/html', cas_root_proxied_as => 'http://test.server', cas_cookie_path => '/my/cas/path'} "
end
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_class('apache::mod::authn_core') }
it { is_expected.to contain_apache__mod('auth_cas') }
it { is_expected.to contain_package('mod_auth_cas') }
- it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.d/auth_cas.conf') }
+ it { is_expected.to contain_file('auth_cas.conf').with_path('/etc/httpd/conf.modules.d/auth_cas.conf') }
it { is_expected.to contain_file('/var/cache/mod_auth_cas/').with_owner('apache') }
it {
is_expected.to contain_concat__fragment('test.server-auth_cas').with(content: %r{^\s+CASRootProxiedAs http://test.server$})
diff --git a/spec/classes/mod/auth_gssapi_spec.rb b/spec/classes/mod/auth_gssapi_spec.rb
index 1d07cbf178..3f67969747 100644
--- a/spec/classes/mod/auth_gssapi_spec.rb
+++ b/spec/classes/mod/auth_gssapi_spec.rb
@@ -15,7 +15,7 @@
it { is_expected.to contain_package('libapache2-mod-auth-gssapi') }
end
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_class('apache::mod::authn_core') }
diff --git a/spec/classes/mod/auth_kerb_spec.rb b/spec/classes/mod/auth_kerb_spec.rb
index 4ca48e7473..867a5b36d5 100644
--- a/spec/classes/mod/auth_kerb_spec.rb
+++ b/spec/classes/mod/auth_kerb_spec.rb
@@ -15,7 +15,7 @@
it { is_expected.to contain_package('libapache2-mod-auth-kerb') }
end
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_class('apache::mod::authn_core') }
@@ -41,7 +41,7 @@
end
context 'overriding mod_packages' do
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
let :pre_condition do
<<-MANIFEST
include apache::params
diff --git a/spec/classes/mod/auth_mellon_spec.rb b/spec/classes/mod/auth_mellon_spec.rb
index 1c490ea6c2..ffeb0e6b58 100644
--- a/spec/classes/mod/auth_mellon_spec.rb
+++ b/spec/classes/mod/auth_mellon_spec.rb
@@ -36,13 +36,13 @@
end
end
context 'default configuration with parameters on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
describe 'with no parameters' do
it { is_expected.to contain_class('apache::mod::authn_core') }
it { is_expected.to contain_apache__mod('auth_mellon') }
it { is_expected.to contain_package('mod_auth_mellon') }
- it { is_expected.to contain_file('auth_mellon.conf').with_path('/etc/httpd/conf.d/auth_mellon.conf') }
+ it { is_expected.to contain_file('auth_mellon.conf').with_path('/etc/httpd/conf.modules.d/auth_mellon.conf') }
it { is_expected.to contain_file('auth_mellon.conf').with_content("MellonCacheSize 100\nMellonLockFile \"/run/mod_auth_mellon/lock\"\n") }
end
describe 'with parameters' do
diff --git a/spec/classes/mod/auth_openidc_spec.rb b/spec/classes/mod/auth_openidc_spec.rb
index 4825783b00..24f6228731 100644
--- a/spec/classes/mod/auth_openidc_spec.rb
+++ b/spec/classes/mod/auth_openidc_spec.rb
@@ -50,7 +50,7 @@
end
context 'overriding mod_packages' do
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
let :pre_condition do
<<-MANIFEST
include apache::params
diff --git a/spec/classes/mod/authn_dbd_spec.rb b/spec/classes/mod/authn_dbd_spec.rb
index 78674161fd..4dca262247 100644
--- a/spec/classes/mod/authn_dbd_spec.rb
+++ b/spec/classes/mod/authn_dbd_spec.rb
@@ -32,12 +32,12 @@
end
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('authn_dbd') }
it { is_expected.to contain_apache__mod('dbd') }
- it { is_expected.to contain_file('authn_dbd.conf').with_path('/etc/httpd/conf.d/authn_dbd.conf') }
+ it { is_expected.to contain_file('authn_dbd.conf').with_path('/etc/httpd/conf.modules.d/authn_dbd.conf') }
end
end
end
diff --git a/spec/classes/mod/cluster_spec.rb b/spec/classes/mod/cluster_spec.rb
index bf2ac85bf0..88783d5fb4 100644
--- a/spec/classes/mod/cluster_spec.rb
+++ b/spec/classes/mod/cluster_spec.rb
@@ -48,27 +48,4 @@
it { is_expected.to contain_file('cluster.conf') }
end
-
- context 'on a RedHat OS Release 6 with mod version < 1.3.0' do
- include_examples 'RedHat 6'
-
- let(:params) do
- {
- allowed_network: '172.17.0',
- balancer_name: 'mycluster',
- ip: '172.17.0.1',
- version: '1.2.0',
- }
- end
-
- it { is_expected.to contain_class('apache') }
- it { is_expected.to contain_apache__mod('proxy') }
- it { is_expected.to contain_apache__mod('proxy_ajp') }
- it { is_expected.to contain_apache__mod('manager') }
- it { is_expected.to contain_apache__mod('proxy_cluster') }
- it { is_expected.to contain_apache__mod('advertise') }
- it { is_expected.to contain_apache__mod('slotmem') }
-
- it { is_expected.to contain_file('cluster.conf') }
- end
end
diff --git a/spec/classes/mod/dav_svn_spec.rb b/spec/classes/mod/dav_svn_spec.rb
index e30744e801..273c603d05 100644
--- a/spec/classes/mod/dav_svn_spec.rb
+++ b/spec/classes/mod/dav_svn_spec.rb
@@ -28,7 +28,7 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('dav_svn') }
diff --git a/spec/classes/mod/deflate_spec.rb b/spec/classes/mod/deflate_spec.rb
index 242ee2f25d..96ecaa0f82 100644
--- a/spec/classes/mod/deflate_spec.rb
+++ b/spec/classes/mod/deflate_spec.rb
@@ -53,12 +53,12 @@ def general_deflate_specs
end
context 'on a RedHat OS with default params' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
# Load the more generic tests for this context
general_deflate_specs
- it { is_expected.to contain_file('deflate.conf').with_path('/etc/httpd/conf.d/deflate.conf') }
+ it { is_expected.to contain_file('deflate.conf').with_path('/etc/httpd/conf.modules.d/deflate.conf') }
end
context 'On a FreeBSD OS with default params' do
diff --git a/spec/classes/mod/dev_spec.rb b/spec/classes/mod/dev_spec.rb
index 53a61148c6..4df6caa9cd 100644
--- a/spec/classes/mod/dev_spec.rb
+++ b/spec/classes/mod/dev_spec.rb
@@ -11,7 +11,7 @@
it_behaves_like 'a mod class, without including apache'
- ['RedHat 6', 'Debian 11', 'FreeBSD 9'].each do |os|
+ ['RedHat 8', 'Debian 11', 'FreeBSD 9'].each do |os|
context "on a #{os} OS" do
include_examples os
diff --git a/spec/classes/mod/dir_spec.rb b/spec/classes/mod/dir_spec.rb
index 9b9ccc3049..21df7e29cb 100644
--- a/spec/classes/mod/dir_spec.rb
+++ b/spec/classes/mod/dir_spec.rb
@@ -3,7 +3,7 @@
require 'spec_helper'
describe 'apache::mod::dir', type: :class do
- ['Debian 11', 'RedHat 6', 'FreeBSD 9', 'Gentoo'].each do |os|
+ ['Debian 11', 'RedHat 8', 'FreeBSD 9', 'Gentoo'].each do |os|
context "default configuration with parameters on #{os}" do
include_examples os
diff --git a/spec/classes/mod/disk_cache_spec.rb b/spec/classes/mod/disk_cache_spec.rb
index dc0dc589cd..7164c424e8 100644
--- a/spec/classes/mod/disk_cache_spec.rb
+++ b/spec/classes/mod/disk_cache_spec.rb
@@ -102,8 +102,8 @@
end
end
- context 'on a RedHat 6-based OS' do
- include_examples 'RedHat 6'
+ context 'on a RedHat 8-based OS' do
+ include_examples 'RedHat 8'
let(:params) do
{
diff --git a/spec/classes/mod/event_spec.rb b/spec/classes/mod/event_spec.rb
index 05d7b57bb8..4ef8179545 100644
--- a/spec/classes/mod/event_spec.rb
+++ b/spec/classes/mod/event_spec.rb
@@ -147,7 +147,7 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'with Apache version >= 2.4' do
let :params do
@@ -160,10 +160,10 @@
it { is_expected.not_to contain_apache__mod('worker') }
it { is_expected.not_to contain_apache__mod('prefork') }
- it { is_expected.to contain_file('/etc/httpd/conf.d/event.conf').with_ensure('file') }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/event.conf').with_ensure('file') }
it {
- is_expected.to contain_file('/etc/httpd/conf.d/event.load').with('ensure' => 'file',
+ is_expected.to contain_file('/etc/httpd/conf.modules.d/event.load').with('ensure' => 'file',
'content' => "LoadModule mpm_event_module modules/mod_mpm_event.so\n")
}
end
diff --git a/spec/classes/mod/ext_filter_spec.rb b/spec/classes/mod/ext_filter_spec.rb
index 7933211cb6..f75b87686c 100644
--- a/spec/classes/mod/ext_filter_spec.rb
+++ b/spec/classes/mod/ext_filter_spec.rb
@@ -22,7 +22,7 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
describe 'with no parameters' do
it { is_expected.to contain_apache__mod('ext_filter') }
@@ -34,7 +34,7 @@
'filtB' => 'input=C cmd="C"' } }
end
- it { is_expected.to contain_file('ext_filter.conf').with_path('/etc/httpd/conf.d/ext_filter.conf') }
+ it { is_expected.to contain_file('ext_filter.conf').with_path('/etc/httpd/conf.modules.d/ext_filter.conf') }
it { is_expected.to contain_file('ext_filter.conf').with_content(%r{^ExtFilterDefine\s+filtA\s+input=A output=B$}) }
it { is_expected.to contain_file('ext_filter.conf').with_content(%r{^ExtFilterDefine\s+filtB\s+input=C cmd="C"$}) }
end
diff --git a/spec/classes/mod/fcgid_spec.rb b/spec/classes/mod/fcgid_spec.rb
index bc6e76dbc1..341a2d986e 100644
--- a/spec/classes/mod/fcgid_spec.rb
+++ b/spec/classes/mod/fcgid_spec.rb
@@ -15,44 +15,6 @@
it { is_expected.to contain_package('libapache2-mod-fcgid') }
end
- context 'on a RHEL6' do
- include_examples 'RedHat 6'
-
- describe 'without parameters' do
- it { is_expected.to contain_class('apache::params') }
- it {
- is_expected.to contain_apache__mod('fcgid').with('loadfile_name' => nil)
- }
- it { is_expected.to contain_package('mod_fcgid') }
- end
-
- describe 'with parameters' do
- let :params do
- {
- options: {
- 'FcgidIPCDir' => '/var/run/fcgidsock',
- 'SharememPath' => '/var/run/fcgid_shm',
- 'FcgidMinProcessesPerClass' => '0',
- 'AddHandler' => 'fcgid-script .fcgi',
- },
- }
- end
-
- expected = [
- '',
- ' AddHandler fcgid-script .fcgi',
- ' FcgidIPCDir /var/run/fcgidsock',
- ' FcgidMinProcessesPerClass 0',
- ' SharememPath /var/run/fcgid_shm',
- '',
- ]
- it 'contains the correct config' do
- content = catalogue.resource('file', 'fcgid.conf').send(:parameters)[:content]
- expect(content.split("\n").reject { |c| c =~ %r{(^#|^$)} }).to eq(expected)
- end
- end
- end
-
context 'on RHEL7' do
include_examples 'RedHat 7'
diff --git a/spec/classes/mod/info_spec.rb b/spec/classes/mod/info_spec.rb
index 2d85bc3007..4ced2ad674 100644
--- a/spec/classes/mod/info_spec.rb
+++ b/spec/classes/mod/info_spec.rb
@@ -2,68 +2,6 @@
require 'spec_helper'
-# This function is called inside the OS specific contexts
-def general_info_specs_apache22
- it { is_expected.to contain_apache__mod('info') }
-
- context 'passing no parameters' do
- expected = "\n"\
- " SetHandler server-info\n"\
- " Order deny,allow\n"\
- " Deny from all\n"\
- " Allow from 127.0.0.1\n"\
- " Allow from ::1\n"\
- "\n"
- it { is_expected.to contain_file('info.conf').with_content(expected) }
- end
- context 'passing restrict_access => false' do
- let :params do
- {
- restrict_access: false,
- }
- end
-
- it {
- is_expected.to contain_file('info.conf').with_content(
- "\n"\
- " SetHandler server-info\n"\
- "\n",
- )
- }
- end
- context "passing allow_from => ['10.10.1.2', '192.168.1.2', '127.0.0.1']" do
- let :params do
- { allow_from: ['10.10.1.2', '192.168.1.2', '127.0.0.1'] }
- end
-
- expected = "\n"\
- " SetHandler server-info\n"\
- " Order deny,allow\n"\
- " Deny from all\n"\
- " Allow from 10.10.1.2\n"\
- " Allow from 192.168.1.2\n"\
- " Allow from 127.0.0.1\n"\
- "\n"
- it { is_expected.to contain_file('info.conf').with_content(expected) }
- end
- context 'passing both restrict_access and allow_from' do
- let :params do
- {
- restrict_access: false,
- allow_from: ['10.10.1.2', '192.168.1.2', '127.0.0.1'],
- }
- end
-
- it {
- is_expected.to contain_file('info.conf').with_content(
- "\n"\
- " SetHandler server-info\n"\
- "\n",
- )
- }
- end
-end
-
def general_info_specs_apache24
it { is_expected.to contain_apache__mod('info') }
@@ -140,14 +78,14 @@ def general_info_specs_apache24
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
# Load the more generic tests for this context
- general_info_specs_apache22
+ general_info_specs_apache24
it {
is_expected.to contain_file('info.conf').with(ensure: 'file',
- path: '/etc/httpd/conf.d/info.conf')
+ path: '/etc/httpd/conf.modules.d/info.conf')
}
end
diff --git a/spec/classes/mod/intercept_form_submit_spec.rb b/spec/classes/mod/intercept_form_submit_spec.rb
index 651150fbc0..1618b138e5 100644
--- a/spec/classes/mod/intercept_form_submit_spec.rb
+++ b/spec/classes/mod/intercept_form_submit_spec.rb
@@ -15,7 +15,7 @@
end # Debian
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache') }
it { is_expected.to contain_package('mod_intercept_form_submit') }
diff --git a/spec/classes/mod/itk_spec.rb b/spec/classes/mod/itk_spec.rb
index 20819e9d75..f981e8310f 100644
--- a/spec/classes/mod/itk_spec.rb
+++ b/spec/classes/mod/itk_spec.rb
@@ -70,11 +70,11 @@
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.not_to contain_apache__mod('itk') }
- it { is_expected.to contain_file('/etc/httpd/conf.d/itk.conf').with_ensure('file') }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/itk.conf').with_ensure('file') }
it { is_expected.to contain_package('httpd-itk') }
context 'with Apache version < 2.4' do
@@ -111,7 +111,7 @@
end
it {
- is_expected.to contain_file('/etc/httpd/conf.d/itk.load').with('ensure' => 'file',
+ is_expected.to contain_file('/etc/httpd/conf.modules.d/itk.load').with('ensure' => 'file',
'content' => "LoadModule mpm_itk_module modules/mod_mpm_itk.so\n")
}
end
@@ -127,7 +127,7 @@
}
end
- it { is_expected.to contain_file('/etc/httpd/conf.d/itk.conf').with_content(%r{EnableCapabilities Off}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/itk.conf').with_content(%r{EnableCapabilities Off}) }
end
end
context 'on a FreeBSD OS' do
diff --git a/spec/classes/mod/jk_spec.rb b/spec/classes/mod/jk_spec.rb
index 767ace9f7b..05e92e02a9 100644
--- a/spec/classes/mod/jk_spec.rb
+++ b/spec/classes/mod/jk_spec.rb
@@ -90,8 +90,8 @@
end
end
- context 'RHEL 6' do
- include_examples 'RedHat 6'
+ context 'RHEL 8' do
+ include_examples 'RedHat 8'
let(:pre_condition) do
'include apache'
end
@@ -107,7 +107,7 @@
context 'and default parameters' do
let(:mod_dir) { mod_dir }
- mod_dir = '/etc/httpd/conf.d'
+ mod_dir = '/etc/httpd/conf.modules.d'
it_behaves_like 'minimal resources', mod_dir
it_behaves_like 'specific workers_file', mod_dir
diff --git a/spec/classes/mod/ldap_spec.rb b/spec/classes/mod/ldap_spec.rb
index 2b965bb33c..9fb165fdd4 100644
--- a/spec/classes/mod/ldap_spec.rb
+++ b/spec/classes/mod/ldap_spec.rb
@@ -55,7 +55,7 @@
end # Debian
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_class('apache::mod::ldap') }
diff --git a/spec/classes/mod/lookup_identity.rb b/spec/classes/mod/lookup_identity.rb
index 30353cf3b7..320d1843cc 100644
--- a/spec/classes/mod/lookup_identity.rb
+++ b/spec/classes/mod/lookup_identity.rb
@@ -15,7 +15,7 @@
end # Debian
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache') }
it { is_expected.to contain_package('mod_lookup_identity') }
diff --git a/spec/classes/mod/mime_magic_spec.rb b/spec/classes/mod/mime_magic_spec.rb
index a66a683fd1..8bc07b89f3 100644
--- a/spec/classes/mod/mime_magic_spec.rb
+++ b/spec/classes/mod/mime_magic_spec.rb
@@ -44,7 +44,7 @@ def general_mime_magic_specs
end
context 'on a RedHat OS with default params' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
general_mime_magic_specs
@@ -54,6 +54,6 @@ def general_mime_magic_specs
)
end
- it { is_expected.to contain_file('mime_magic.conf').with_path('/etc/httpd/conf.d/mime_magic.conf') }
+ it { is_expected.to contain_file('mime_magic.conf').with_path('/etc/httpd/conf.modules.d/mime_magic.conf') }
end
end
diff --git a/spec/classes/mod/mime_spec.rb b/spec/classes/mod/mime_spec.rb
index 88bc648178..0891059f02 100644
--- a/spec/classes/mod/mime_spec.rb
+++ b/spec/classes/mod/mime_spec.rb
@@ -26,10 +26,10 @@ def general_mime_specs
end
context 'on a RedHat OS with default params', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
general_mime_specs
- it { is_expected.to contain_file('mime.conf').with_path('/etc/httpd/conf.d/mime.conf') }
+ it { is_expected.to contain_file('mime.conf').with_path('/etc/httpd/conf.modules.d/mime.conf') }
end
end
diff --git a/spec/classes/mod/pagespeed_spec.rb b/spec/classes/mod/pagespeed_spec.rb
index a9e9d95c57..9890db02b9 100644
--- a/spec/classes/mod/pagespeed_spec.rb
+++ b/spec/classes/mod/pagespeed_spec.rb
@@ -28,7 +28,7 @@
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('pagespeed') }
diff --git a/spec/classes/mod/perl_spec.rb b/spec/classes/mod/perl_spec.rb
index 84d8cb9898..c59f2bf2ac 100644
--- a/spec/classes/mod/perl_spec.rb
+++ b/spec/classes/mod/perl_spec.rb
@@ -12,7 +12,7 @@
it { is_expected.to contain_package('libapache2-mod-perl2') }
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('perl') }
diff --git a/spec/classes/mod/prefork_spec.rb b/spec/classes/mod/prefork_spec.rb
index 9a8afd9462..d0c7fdfac2 100644
--- a/spec/classes/mod/prefork_spec.rb
+++ b/spec/classes/mod/prefork_spec.rb
@@ -43,11 +43,11 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.not_to contain_apache__mod('prefork') }
- it { is_expected.to contain_file('/etc/httpd/conf.d/prefork.conf').with_ensure('file') }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.conf').with_ensure('file') }
context 'with Apache version < 2.4' do
let :params do
@@ -59,8 +59,8 @@
it {
is_expected.to contain_file_line('/etc/sysconfig/httpd prefork enable').with('require' => 'Package[httpd]')
}
- it { is_expected.to contain_file('/etc/httpd/conf.d/prefork.conf').without('content' => %r{MaxRequestWorkers}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/prefork.conf').without('content' => %r{MaxConnectionsPerChild}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.conf').without('content' => %r{MaxRequestWorkers}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.conf').without('content' => %r{MaxConnectionsPerChild}) }
end
context 'with Apache version >= 2.4' do
@@ -75,11 +75,11 @@
it { is_expected.not_to contain_apache__mod('event') }
it {
- is_expected.to contain_file('/etc/httpd/conf.d/prefork.load').with('ensure' => 'file',
+ is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.load').with('ensure' => 'file',
'content' => "LoadModule mpm_prefork_module modules/mod_mpm_prefork.so\n")
}
- it { is_expected.to contain_file('/etc/httpd/conf.d/prefork.conf').without('content' => %r{MaxClients}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/prefork.conf').without('content' => %r{MaxRequestsPerChild}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.conf').without('content' => %r{MaxClients}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/prefork.conf').without('content' => %r{MaxRequestsPerChild}) }
end
end
context 'on a FreeBSD OS' do
diff --git a/spec/classes/mod/proxy_balancer_spec.rb b/spec/classes/mod/proxy_balancer_spec.rb
index 5ba4e4a4f7..0b28526926 100644
--- a/spec/classes/mod/proxy_balancer_spec.rb
+++ b/spec/classes/mod/proxy_balancer_spec.rb
@@ -33,7 +33,7 @@ def balancer_manager_conf_spec(allow_from, manager_path)
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_apache__mod('proxy_balancer') }
diff --git a/spec/classes/mod/proxy_html_spec.rb b/spec/classes/mod/proxy_html_spec.rb
index 43f96c35b1..e40f5e18d7 100644
--- a/spec/classes/mod/proxy_html_spec.rb
+++ b/spec/classes/mod/proxy_html_spec.rb
@@ -33,7 +33,7 @@
end
context 'on a RedHat OS', :compile do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('proxy_html').with(loadfiles: nil) }
diff --git a/spec/classes/mod/python_spec.rb b/spec/classes/mod/python_spec.rb
index 5c7d024c03..4dbefd1bed 100644
--- a/spec/classes/mod/python_spec.rb
+++ b/spec/classes/mod/python_spec.rb
@@ -13,19 +13,19 @@
it { is_expected.to contain_package('libapache2-mod-python') }
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_apache__mod('python') }
it { is_expected.to contain_package('mod_python') }
- it { is_expected.to contain_file('python.load').with_path('/etc/httpd/conf.d/python.load') }
+ it { is_expected.to contain_file('python.load').with_path('/etc/httpd/conf.modules.d/python.load') }
describe 'with loadfile_name specified' do
let :params do
{ loadfile_name: 'FooBar' }
end
- it { is_expected.to contain_file('FooBar').with_path('/etc/httpd/conf.d/FooBar') }
+ it { is_expected.to contain_file('FooBar').with_path('/etc/httpd/conf.modules.d/FooBar') }
end
end
context 'on a FreeBSD OS' do
diff --git a/spec/classes/mod/reqtimeout_spec.rb b/spec/classes/mod/reqtimeout_spec.rb
index aee45edfd1..9cf449c3cf 100644
--- a/spec/classes/mod/reqtimeout_spec.rb
+++ b/spec/classes/mod/reqtimeout_spec.rb
@@ -32,7 +32,7 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'passing no parameters' do
it { is_expected.to contain_class('apache::params') }
diff --git a/spec/classes/mod/shib_spec.rb b/spec/classes/mod/shib_spec.rb
index f9e0442921..a1f25afb33 100644
--- a/spec/classes/mod/shib_spec.rb
+++ b/spec/classes/mod/shib_spec.rb
@@ -12,7 +12,7 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
describe 'with no parameters' do
it { is_expected.to contain_apache__mod('shib2').with_id('mod_shib') }
diff --git a/spec/classes/mod/speling_spec.rb b/spec/classes/mod/speling_spec.rb
index 5f4e18c5af..1ba5bf0389 100644
--- a/spec/classes/mod/speling_spec.rb
+++ b/spec/classes/mod/speling_spec.rb
@@ -11,7 +11,7 @@
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_apache__mod('speling') }
end
diff --git a/spec/classes/mod/ssl_spec.rb b/spec/classes/mod/ssl_spec.rb
index 9f6b660000..a16b4c95a8 100644
--- a/spec/classes/mod/ssl_spec.rb
+++ b/spec/classes/mod/ssl_spec.rb
@@ -11,15 +11,6 @@
end
context 'on a RedHat' do
- context '6 OS' do
- include_examples 'RedHat 6'
-
- it { is_expected.to contain_class('apache::params') }
- it { is_expected.to contain_apache__mod('ssl') }
- it { is_expected.to contain_package('mod_ssl') }
- it { is_expected.to contain_file('ssl.conf').with_path('/etc/httpd/conf.d/ssl.conf') }
- it { is_expected.to contain_file('ssl.conf').with_content(%r{SSLProtocol all -SSLv2 -SSLv3}) }
- end
context '8 OS' do
include_examples 'RedHat 8'
@@ -29,18 +20,6 @@
it { is_expected.to contain_file('ssl.conf').with_path('/etc/httpd/conf.modules.d/ssl.conf') }
it { is_expected.to contain_file('ssl.conf').with_content(%r{SSLProtocol all}) }
end
- context '6 OS with a custom package_name parameter' do
- include_examples 'RedHat 6'
- let :params do
- { package_name: 'httpd24-mod_ssl' }
- end
-
- it { is_expected.to contain_class('apache::params') }
- it { is_expected.to contain_apache__mod('ssl') }
- it { is_expected.to contain_package('httpd24-mod_ssl') }
- it { is_expected.not_to contain_package('mod_ssl') }
- it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLSessionCache "shmcb:/var/cache/mod_ssl/scache\(512000\)"$}) }
- end
context '7 OS with custom directories for PR#1635' do
include_examples 'RedHat 7'
@@ -91,7 +70,7 @@
end
# Template config doesn't vary by distro
context 'on all distros' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'not setting ssl_pass_phrase_dialog' do
it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLPassPhraseDialog builtin$}) }
@@ -277,7 +256,7 @@
}
end
- it { is_expected.to contain_file('ssl.conf').with_content(%r{^ SSLMutex posixsem$}) }
+ it { is_expected.to contain_file('ssl.conf').with_content(%r{^ Mutex posixsem$}) }
end
context 'setting ssl_sessioncache' do
let :params do
diff --git a/spec/classes/mod/status_spec.rb b/spec/classes/mod/status_spec.rb
index 1b8740a174..37a6451d2f 100644
--- a/spec/classes/mod/status_spec.rb
+++ b/spec/classes/mod/status_spec.rb
@@ -2,27 +2,6 @@
require 'spec_helper'
-# Helper function for testing the contents of `status.conf`
-# Apache < 2.4
-shared_examples 'status_conf_spec' do |allow_from, extended_status, status_path|
- expected =
- "\n"\
- " SetHandler server-status\n"\
- " Order deny,allow\n"\
- " Deny from all\n"\
- " Allow from #{Array(allow_from).join(' ')}\n"\
- "\n"\
- "ExtendedStatus #{extended_status}\n"\
- "\n"\
- "\n"\
- " # Show Proxy LoadBalancer status in mod_status\n"\
- " ProxyStatus On\n"\
- "\n"
- it('status conf') do
- is_expected.to contain_file('status.conf').with_content(expected)
- end
-end
-
# Apache >= 2.4
def require_directives(requires)
if requires == :undef
@@ -147,15 +126,15 @@ def require_directives(requires)
end
end
- context 'on a RedHat 6 OS' do
- include_examples 'RedHat 6'
+ context 'on a RedHat 8 OS' do
+ include_examples 'RedHat 8'
context 'with default params' do
it { is_expected.to contain_apache__mod('status') }
- include_examples 'status_conf_spec', ['127.0.0.1', '::1'], 'On', '/server-status'
+ include_examples 'status_conf_spec_require', 'ip 127.0.0.1 ::1', 'On', '/server-status'
- it { is_expected.to contain_file('status.conf').with_path('/etc/httpd/conf.d/status.conf') }
+ it { is_expected.to contain_file('status.conf').with_path('/etc/httpd/conf.modules.d/status.conf') }
end
end
diff --git a/spec/classes/mod/worker_spec.rb b/spec/classes/mod/worker_spec.rb
index 8d2c32d9ac..aaed242378 100644
--- a/spec/classes/mod/worker_spec.rb
+++ b/spec/classes/mod/worker_spec.rb
@@ -43,11 +43,11 @@
end
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to contain_class('apache::params') }
it { is_expected.not_to contain_apache__mod('worker') }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with_ensure('file') }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with_ensure('file') }
context 'with Apache version < 2.4' do
let :params do
@@ -71,7 +71,7 @@
it { is_expected.not_to contain_apache__mod('event') }
it {
- is_expected.to contain_file('/etc/httpd/conf.d/worker.load').with('ensure' => 'file',
+ is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.load').with('ensure' => 'file',
'content' => "LoadModule mpm_worker_module modules/mod_mpm_worker.so\n")
}
end
@@ -93,19 +93,19 @@
# Template config doesn't vary by distro
context 'on all distros' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'defaults' do
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ServerLimit\s+25$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+StartServers\s+2$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxClients\s+150$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MinSpareThreads\s+25$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxSpareThreads\s+75$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ThreadsPerChild\s+25$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxRequestsPerChild\s+0$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ThreadLimit\s+64$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s*ListenBacklog\s*511}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ServerLimit\s+25$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+StartServers\s+2$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxClients\s+150$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MinSpareThreads\s+25$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxSpareThreads\s+75$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ThreadsPerChild\s+25$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxRequestsPerChild\s+0$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ThreadLimit\s+64$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s*ListenBacklog\s*511}) }
end
context 'setting params' do
@@ -123,16 +123,16 @@
}
end
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ServerLimit\s+10$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+StartServers\s+11$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxClients\s+12$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MinSpareThreads\s+13$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxSpareThreads\s+14$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ThreadsPerChild\s+15$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+MaxRequestsPerChild\s+16$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s+ThreadLimit\s+17$}) }
- it { is_expected.to contain_file('/etc/httpd/conf.d/worker.conf').with(content: %r{^\s*ListenBacklog\s*8}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ServerLimit\s+10$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+StartServers\s+11$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxClients\s+12$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MinSpareThreads\s+13$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxSpareThreads\s+14$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ThreadsPerChild\s+15$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+MaxRequestsPerChild\s+16$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s+ThreadLimit\s+17$}) }
+ it { is_expected.to contain_file('/etc/httpd/conf.modules.d/worker.conf').with(content: %r{^\s*ListenBacklog\s*8}) }
end
end
end
diff --git a/spec/classes/mod/wsgi_spec.rb b/spec/classes/mod/wsgi_spec.rb
index 4b3081dc9b..95d10625d6 100644
--- a/spec/classes/mod/wsgi_spec.rb
+++ b/spec/classes/mod/wsgi_spec.rb
@@ -16,19 +16,9 @@
it { is_expected.to contain_package('libapache2-mod-wsgi-py3') }
end
context 'on a RedHat OS' do
- include_examples 'RedHat 6'
-
- it { is_expected.to contain_class('apache::params') }
- it {
- is_expected.to contain_class('apache::mod::wsgi').with(
- 'wsgi_socket_prefix' => '/var/run/wsgi',
- )
- }
- it { is_expected.to contain_package('mod_wsgi') }
+ include_examples 'RedHat 8'
context 'on RHEL8' do
- include_examples 'RedHat 8'
-
it { is_expected.to contain_class('apache::params') }
it { is_expected.to contain_file('wsgi.load').with_content(%r{LoadModule wsgi_module modules/mod_wsgi_python3.so}) }
it { is_expected.to contain_package('python3-mod_wsgi') }
diff --git a/spec/classes/vhosts_spec.rb b/spec/classes/vhosts_spec.rb
index 2c75ea69c7..01ae1848c3 100644
--- a/spec/classes/vhosts_spec.rb
+++ b/spec/classes/vhosts_spec.rb
@@ -4,7 +4,7 @@
describe 'apache::vhosts', type: :class do
context 'on all OSes' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
context 'with custom vhosts parameter' do
let :params do
diff --git a/spec/defines/mod_spec.rb b/spec/defines/mod_spec.rb
index f873b0cf6c..a510cd564c 100644
--- a/spec/defines/mod_spec.rb
+++ b/spec/defines/mod_spec.rb
@@ -12,12 +12,12 @@
end
context 'on a RedHat osfamily' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
describe 'for non-special modules' do
it { is_expected.to contain_class('apache::params') }
it 'manages the module load file' do
- is_expected.to contain_file('spec_m.load').with(path: '/etc/httpd/conf.d/spec_m.load',
+ is_expected.to contain_file('spec_m.load').with(path: '/etc/httpd/conf.modules.d/spec_m.load',
content: "LoadModule spec_m_module modules/mod_spec_m.so\n",
owner: 'root',
group: 'root',
diff --git a/spec/defines/vhost_custom_spec.rb b/spec/defines/vhost_custom_spec.rb
index 9409ed61b6..43a0ab25e3 100644
--- a/spec/defines/vhost_custom_spec.rb
+++ b/spec/defines/vhost_custom_spec.rb
@@ -14,7 +14,7 @@
describe 'os-dependent items' do
context 'on RedHat based systems' do
- include_examples 'RedHat 6'
+ include_examples 'RedHat 8'
it { is_expected.to compile }
end
diff --git a/spec/spec_helper_local.rb b/spec/spec_helper_local.rb
index 43da2b68fa..2f252c8e84 100644
--- a/spec/spec_helper_local.rb
+++ b/spec/spec_helper_local.rb
@@ -49,10 +49,6 @@
let(:facts) { on_supported_os['ubuntu-18.04-x86_64'] }
end
-shared_context 'RedHat 6' do
- let(:facts) { on_supported_os['redhat-6-x86_64'] }
-end
-
shared_context 'RedHat 7' do
let(:facts) { on_supported_os['redhat-7-x86_64'] }
end