File tree Expand file tree Collapse file tree 11 files changed +26
-94
lines changed Expand file tree Collapse file tree 11 files changed +26
-94
lines changed Original file line number Diff line number Diff line change 378
378
' 9' => ' 7.0' , # Debian Stretch
379
379
' 10' => ' 7.3' , # Debian Buster
380
380
' 11' => ' 7.4' , # Debian Bullseye
381
+ ' 12' => ' 8.2' , # Debian Bookworm
381
382
' 20.04' => ' 7.4' , # Ubuntu Foccal Fossal
382
383
' 22.04' => ' 8.1' , # Ubuntu Jammy
383
384
default => ' 7.2' , # Ubuntu Bionic, Cosmic and Disco
Original file line number Diff line number Diff line change 49
49
"operatingsystem" : " Debian" ,
50
50
"operatingsystemrelease" : [
51
51
" 10" ,
52
- " 11"
52
+ " 11" ,
53
+ " 12"
53
54
]
54
55
},
55
56
{
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 @@ -36,6 +36,10 @@ class { 'apache::mod::php': }
36
36
describe file ( "#{ apache_hash [ 'mod_dir' ] } /php7.4.conf" ) do
37
37
it { is_expected . to contain 'DirectoryIndex index.php' }
38
38
end
39
+ elsif os [ :family ] == 'debian' && os [ :release ] =~ %r{^12\. }
40
+ describe file ( "#{ apache_hash [ 'mod_dir' ] } /php8.2.conf" ) do
41
+ it { is_expected . to contain 'DirectoryIndex index.php' }
42
+ end
39
43
elsif os [ :family ] == 'ubuntu' && os [ :release ] == '18.04'
40
44
describe file ( "#{ apache_hash [ 'mod_dir' ] } /php7.2.conf" ) do
41
45
it { is_expected . to contain 'DirectoryIndex index.php' }
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 84
84
}
85
85
end
86
86
end
87
+ when '12'
88
+ context 'on bookworm' do
89
+ it { is_expected . to contain_apache__mod ( 'php8.2' ) }
90
+ it { is_expected . to contain_package ( 'libapache2-mod-php8.2' ) }
91
+
92
+ it {
93
+ expect ( subject ) . to contain_file ( 'php8.2.load' ) . with (
94
+ content : "LoadModule php8_module /usr/lib/apache2/modules/libphp8.2.so\n " ,
95
+ )
96
+ }
97
+ end
87
98
when '18.04'
88
99
context 'on bionic' do
89
100
let :params do
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