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 5
5
case os [ :family ]
6
6
when 'debian' , 'ubuntu'
7
7
service_name = 'apache2'
8
- variant = :prefork
9
8
when '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'
14
10
when 'freebsd'
15
11
service_name = 'apache24'
16
- variant = :prefork
17
12
end
18
13
19
14
# IAC-787: The http-itk mod package is not available in any of the standard RHEL/CentOS 8.x repos. Disable this test
20
15
# on those platforms until we can find a suitable source for this package.
21
16
describe 'apache::mod::itk class' , if : service_name && mod_supported_on_platform? ( 'apache::mod::itk' ) do
22
17
describe 'running puppet code' do
23
- let ( :pp ) do
24
- case variant
25
- when :prefork
26
- <<-MANIFEST
18
+ pp = <<-MANIFEST
27
19
class { 'apache':
28
20
mpm_module => 'prefork',
29
21
}
30
22
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
40
24
41
25
it 'behaves idempotently' do
42
26
idempotent_apply ( pp )
Original file line number Diff line number Diff line change 17
17
# rubocop:disable Layout/LineLength
18
18
expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
19
19
'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 " )
37
20
# rubocop:enable Layout/LineLength
38
21
}
39
22
end
Original file line number Diff line number Diff line change 17
17
# rubocop:disable Layout/LineLength
18
18
expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
19
19
'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 " )
37
20
# rubocop:enable Layout/LineLength
38
21
}
39
22
end
Original file line number Diff line number Diff line change 17
17
# rubocop:disable Layout/LineLength
18
18
expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
19
19
'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 " )
37
20
# rubocop:enable Layout/LineLength
38
21
}
39
22
end
Original file line number Diff line number Diff line change 17
17
# rubocop:disable Layout/LineLength
18
18
expect ( subject ) . to contain_file ( '/etc/apache2/mods-enabled/lbmethod_byrequests.load' ) . with ( 'ensure' => 'file' ,
19
19
'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 " )
37
20
# rubocop:enable Layout/LineLength
38
21
}
39
22
end
Original file line number Diff line number Diff line change 2020
2020
it { is_expected . to compile }
2021
2021
it { is_expected . to contain_concat ( '25-rspec.example.com.conf' ) }
2022
2022
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'
2025
2024
it {
2026
2025
expect ( subject ) . to contain_concat__fragment ( 'rspec.example.com-directories' ) . with (
2027
2026
content : %r{^\s +Require all granted$} ,
Original file line number Diff line number Diff line change 12
12
foobar_linux = 'foobar_linux'
13
13
14
14
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 ] ,
19
19
'debian' => [ 8 , 9 , 10 ] ,
20
20
'sles' => [ 11 , 12 , 15 ] ,
21
21
'ubuntu' => [ 14 , 16 , 18 ]
You can’t perform that action at this time.
0 commit comments