File tree Expand file tree Collapse file tree 7 files changed +8
-93
lines changed
Expand file tree Collapse file tree 7 files changed +8
-93
lines changed Original file line number Diff line number Diff line change 55case os [ :family ]
66when 'debian' , 'ubuntu'
77 service_name = 'apache2'
8- variant = :prefork
98when 'redhat'
10- unless %r{^5} . match? ( os [ :release ] )
11- variant = ( os [ :release ] . to_i >= 7 ) ? :prefork : :itk_only
12- service_name = 'httpd'
13- end
9+ service_name = 'httpd'
1410when 'freebsd'
1511 service_name = 'apache24'
16- variant = :prefork
1712end
1813
1914# IAC-787: The http-itk mod package is not available in any of the standard RHEL/CentOS 8.x repos. Disable this test
2015# on those platforms until we can find a suitable source for this package.
2116describe 'apache::mod::itk class' , if : service_name && mod_supported_on_platform? ( 'apache::mod::itk' ) do
2217 describe 'running puppet code' do
23- let ( :pp ) do
24- case variant
25- when :prefork
26- <<-MANIFEST
18+ pp = <<-MANIFEST
2719 class { 'apache':
2820 mpm_module => 'prefork',
2921 }
3022 class { 'apache::mod::itk': }
31- MANIFEST
32- when :itk_only
33- <<-MANIFEST
34- class { 'apache':
35- mpm_module => 'itk',
36- }
37- MANIFEST
38- end
39- end
23+ MANIFEST
4024
4125 it 'behaves idempotently' do
4226 idempotent_apply ( pp )
Original file line number Diff line number Diff line change 1717 # rubocop:disable Layout/LineLength
1818 expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
1919 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n " )
20- }
21- end
22- end
23-
24- context 'on a RedHat OS' do
25- include_examples 'RedHat 6'
26-
27- context 'with Apache version >= 2.4' do
28- let :params do
29- {
30- apache_version : '2.4'
31- }
32- end
33-
34- it {
35- expect ( subject ) . to contain_file ( '/etc/httpd/conf.modules.d/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
36- 'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n " )
3720 # rubocop:enable Layout/LineLength
3821 }
3922 end
Original file line number Diff line number Diff line change 1717 # rubocop:disable Layout/LineLength
1818 expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
1919 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n " )
20- }
21- end
22- end
23-
24- context 'on a RedHat OS' do
25- include_examples 'RedHat 6'
26-
27- context 'with Apache version >= 2.4' do
28- let :params do
29- {
30- apache_version : '2.4'
31- }
32- end
33-
34- it {
35- expect ( subject ) . to contain_file ( '/etc/httpd/conf.modules.d/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
36- 'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n " )
3720 # rubocop:enable Layout/LineLength
3821 }
3922 end
Original file line number Diff line number Diff line change 1717 # rubocop:disable Layout/LineLength
1818 expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
1919 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n " )
20- }
21- end
22- end
23-
24- context 'on a RedHat OS' do
25- include_examples 'RedHat 6'
26-
27- context 'with Apache version >= 2.4' do
28- let :params do
29- {
30- apache_version : '2.4'
31- }
32- end
33-
34- it {
35- expect ( subject ) . to contain_file ( '/etc/httpd/conf.modules.d/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
36- 'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n " )
3720 # rubocop:enable Layout/LineLength
3821 }
3922 end
Original file line number Diff line number Diff line change 1717 # rubocop:disable Layout/LineLength
1818 expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
1919 'content' => "LoadModule lbmethod_byrequests_module /usr/lib/apache2/modules/mod_lbmethod_byrequests.so\n " )
20- }
21- end
22- end
23-
24- context 'on a RedHat OS' do
25- include_examples 'RedHat 6'
26-
27- context 'with Apache version >= 2.4' do
28- let :params do
29- {
30- apache_version : '2.4'
31- }
32- end
33-
34- it {
35- expect ( subject ) . to contain_file ( '/etc/httpd/conf.modules.d/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
36- 'content' => "LoadModule lbmethod_byrequests_module modules/mod_lbmethod_byrequests.so\n " )
3720 # rubocop:enable Layout/LineLength
3821 }
3922 end
Original file line number Diff line number Diff line change 20202020 it { is_expected . to compile }
20212021 it { is_expected . to contain_concat ( '25-rspec.example.com.conf' ) }
20222022
2023- if ( os_facts [ :os ] [ 'family' ] == 'RedHat' && os_facts [ :os ] [ 'release' ] [ 'major' ] . to_i > 6 ) ||
2024- ( os_facts [ :os ] [ 'name' ] == 'SLES' && os_facts [ :os ] [ 'release' ] [ 'major' ] . to_i > 11 )
2023+ if os_facts [ :os ] [ 'family' ] == 'RedHat' || os_facts [ :os ] [ 'name' ] == 'SLES'
20252024 it {
20262025 expect ( subject ) . to contain_concat__fragment ( 'rspec.example.com-directories' ) . with (
20272026 content : %r{^\s +Require all granted$} ,
Original file line number Diff line number Diff line change 1212 foobar_linux = 'foobar_linux'
1313
1414 expected_compatible_platform_versions = {
15- 'redhat' => [ 6 , 7 , 8 ] ,
16- 'centos' => [ 6 , 7 , 8 ] ,
17- 'oraclelinux' => [ 6 , 7 ] ,
18- 'scientific' => [ 6 , 7 ] ,
15+ 'redhat' => [ 7 , 8 ] ,
16+ 'centos' => [ 7 , 8 ] ,
17+ 'oraclelinux' => [ 7 ] ,
18+ 'scientific' => [ 7 ] ,
1919 'debian' => [ 8 , 9 , 10 ] ,
2020 'sles' => [ 11 , 12 , 15 ] ,
2121 'ubuntu' => [ 14 , 16 , 18 ]
You can’t perform that action at this time.
0 commit comments