Skip to content

pdksync - (CONT-189) Remove support for RedHat6 / OracleLinux6 / Scientific6 #2326

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Oct 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
{
"operatingsystem": "RedHat",
"operatingsystemrelease": [
"6",
"7",
"8",
"9"
Expand All @@ -37,14 +36,12 @@
{
"operatingsystem": "OracleLinux",
"operatingsystemrelease": [
"6",
"7"
]
},
{
"operatingsystem": "Scientific",
"operatingsystemrelease": [
"6",
"7"
]
},
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/apache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 0 additions & 6 deletions spec/classes/mod/alias_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'

Expand Down
8 changes: 4 additions & 4 deletions spec/classes/mod/auth_cas_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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}) }
Expand All @@ -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$})
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/mod/auth_gssapi_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/auth_kerb_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/auth_mellon_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/mod/auth_openidc_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/authn_dbd_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
23 changes: 0 additions & 23 deletions spec/classes/mod/cluster_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion spec/classes/mod/dav_svn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/deflate_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/mod/dev_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion spec/classes/mod/dir_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/disk_cache_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand Down
6 changes: 3 additions & 3 deletions spec/classes/mod/event_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
4 changes: 2 additions & 2 deletions spec/classes/mod/ext_filter_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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') }
Expand All @@ -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
Expand Down
38 changes: 0 additions & 38 deletions spec/classes/mod/fcgid_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = [
'<IfModule mod_fcgid.c>',
' AddHandler fcgid-script .fcgi',
' FcgidIPCDir /var/run/fcgidsock',
' FcgidMinProcessesPerClass 0',
' SharememPath /var/run/fcgid_shm',
'</IfModule>',
]
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'

Expand Down
68 changes: 3 additions & 65 deletions spec/classes/mod/info_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "<Location /server-info>\n"\
" SetHandler server-info\n"\
" Order deny,allow\n"\
" Deny from all\n"\
" Allow from 127.0.0.1\n"\
" Allow from ::1\n"\
"</Location>\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(
"<Location /server-info>\n"\
" SetHandler server-info\n"\
"</Location>\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 = "<Location /server-info>\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"\
"</Location>\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(
"<Location /server-info>\n"\
" SetHandler server-info\n"\
"</Location>\n",
)
}
end
end

def general_info_specs_apache24
it { is_expected.to contain_apache__mod('info') }

Expand Down Expand Up @@ -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

Expand Down
Loading