Skip to content

Commit

Permalink
(CAT-1424)-Removal of redhat/scientific/oraclelinux 6 for apache module
Browse files Browse the repository at this point in the history
  • Loading branch information
praj1001 committed Sep 20, 2023
1 parent abb8410 commit 55dfd06
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 93 deletions.
22 changes: 3 additions & 19 deletions spec/acceptance/itk_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,38 +5,22 @@
case os[:family]
when 'debian', 'ubuntu'
service_name = 'apache2'
variant = :prefork
when 'redhat'
unless %r{^5}.match?(os[:release])
variant = (os[:release].to_i >= 7) ? :prefork : :itk_only
service_name = 'httpd'
end
service_name = 'httpd'
when 'freebsd'
service_name = 'apache24'
variant = :prefork
end

# IAC-787: The http-itk mod package is not available in any of the standard RHEL/CentOS 8.x repos. Disable this test
# on those platforms until we can find a suitable source for this package.
describe 'apache::mod::itk class', if: service_name && mod_supported_on_platform?('apache::mod::itk') do
describe 'running puppet code' do
let(:pp) do
case variant
when :prefork
<<-MANIFEST
pp = <<-MANIFEST
class { 'apache':
mpm_module => 'prefork',
}
class { 'apache::mod::itk': }
MANIFEST
when :itk_only
<<-MANIFEST
class { 'apache':
mpm_module => 'itk',
}
MANIFEST
end
end
MANIFEST

it 'behaves idempotently' do
idempotent_apply(pp)
Expand Down
17 changes: 0 additions & 17 deletions spec/classes/mod/lbmethod_bybusyness.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
}
end
end

context 'on a RedHat OS' do
include_examples 'RedHat 6'

context 'with Apache version >= 2.4' do
let :params do
{
apache_version: '2.4'
}
end

it {
expect(subject).to contain_file('/etc/httpd/conf.modules.d/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
Expand Down
17 changes: 0 additions & 17 deletions spec/classes/mod/lbmethod_byrequests.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
}
end
end

context 'on a RedHat OS' do
include_examples 'RedHat 6'

context 'with Apache version >= 2.4' do
let :params do
{
apache_version: '2.4'
}
end

it {
expect(subject).to contain_file('/etc/httpd/conf.modules.d/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
Expand Down
17 changes: 0 additions & 17 deletions spec/classes/mod/lbmethod_bytraffic.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
}
end
end

context 'on a RedHat OS' do
include_examples 'RedHat 6'

context 'with Apache version >= 2.4' do
let :params do
{
apache_version: '2.4'
}
end

it {
expect(subject).to contain_file('/etc/httpd/conf.modules.d/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
Expand Down
17 changes: 0 additions & 17 deletions spec/classes/mod/lbmethod_heartbeat.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,6 @@
# rubocop:disable Layout/LineLength
expect(subject).to contain_file('/etc/apache2/mods-enabled/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n")
}
end
end

context 'on a RedHat OS' do
include_examples 'RedHat 6'

context 'with Apache version >= 2.4' do
let :params do
{
apache_version: '2.4'
}
end

it {
expect(subject).to contain_file('/etc/httpd/conf.modules.d/lbmethod_byrequests.load').with('ensure' => 'file',
'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n")
# rubocop:enable Layout/LineLength
}
end
Expand Down
3 changes: 1 addition & 2 deletions spec/defines/vhost_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2020,8 +2020,7 @@
it { is_expected.to compile }
it { is_expected.to contain_concat('25-rspec.example.com.conf') }

if (os_facts[:os]['family'] == 'RedHat' && os_facts[:os]['release']['major'].to_i > 6) ||
(os_facts[:os]['name'] == 'SLES' && os_facts[:os]['release']['major'].to_i > 11)
if os_facts[:os]['family'] == 'RedHat' || os_facts[:os]['name'] == 'SLES'
it {
expect(subject).to contain_concat__fragment('rspec.example.com-directories').with(
content: %r{^\s+Require all granted$},
Expand Down
8 changes: 4 additions & 4 deletions spec/util/apache_mod_platform_compatibility_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
foobar_linux = 'foobar_linux'

expected_compatible_platform_versions = {
'redhat' => [6, 7, 8],
'centos' => [6, 7, 8],
'oraclelinux' => [6, 7],
'scientific' => [6, 7],
'redhat' => [7, 8],
'centos' => [7, 8],
'oraclelinux' => [7],
'scientific' => [7],
'debian' => [8, 9, 10],
'sles' => [11, 12, 15],
'ubuntu' => [14, 16, 18]
Expand Down

0 comments on commit 55dfd06

Please sign in to comment.