Skip to content

Commit 12a3a36

Browse files
committed
(GH-2261) Temporary test exclusion
Test's have been temporarily excluded on Redhat 9 pending completion of: #2261
1 parent edbdb65 commit 12a3a36

File tree

1 file changed

+88
-85
lines changed

1 file changed

+88
-85
lines changed

spec/acceptance/mod_php_spec.rb

Lines changed: 88 additions & 85 deletions
Original file line numberDiff line numberDiff line change
@@ -3,98 +3,101 @@
33
require 'spec_helper_acceptance'
44
apache_hash = apache_settings_hash
55

6-
describe 'apache::mod::php class', if: mod_supported_on_platform?('apache::mod::php') do
7-
context 'default php config' do
8-
pp = <<-MANIFEST
9-
class { 'apache':
10-
mpm_module => 'prefork',
11-
}
12-
class { 'apache::mod::php': }
13-
apache::vhost { 'php.example.com':
14-
port => '80',
15-
docroot => '#{apache_hash['doc_root']}/php',
16-
}
17-
host { 'php.example.com': ip => '127.0.0.1', }
18-
file { '#{apache_hash['doc_root']}/php/index.php':
19-
ensure => file,
20-
content => "<?php phpinfo(); ?>\\n",
21-
}
22-
MANIFEST
23-
it 'succeeds in puppeting php' do
24-
apply_manifest(pp, catch_failures: true)
25-
end
26-
27-
if os[:family] == 'debian' && os[:release] =~ %r{^9\.}
28-
describe file("#{apache_hash['mod_dir']}/php7.0.conf") do
29-
it { is_expected.to contain 'DirectoryIndex index.php' }
30-
end
31-
elsif os[:family] == 'debian' && os[:release] =~ %r{^10\.}
32-
describe file("#{apache_hash['mod_dir']}/php7.3.conf") do
33-
it { is_expected.to contain 'DirectoryIndex index.php' }
34-
end
35-
elsif os[:family] == 'debian' && os[:release] =~ %r{^11\.}
36-
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
37-
it { is_expected.to contain 'DirectoryIndex index.php' }
38-
end
39-
elsif os[:family] == 'ubuntu' && os[:release] == '18.04'
40-
describe file("#{apache_hash['mod_dir']}/php7.2.conf") do
41-
it { is_expected.to contain 'DirectoryIndex index.php' }
42-
end
43-
elsif os[:family] == 'ubuntu' && os[:release] == '20.04'
44-
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
45-
it { is_expected.to contain 'DirectoryIndex index.php' }
46-
end
47-
elsif os[:family] == 'redhat' && os[:release] =~ %r{^(9)\b}
48-
describe file("#{apache_hash['mod_dir']}/php.conf") do
49-
it { is_expected.to contain 'DirectoryIndex index.php' }
6+
# Temporary exclusion pending resolution of https://github.com/puppetlabs/puppetlabs-apache/issues/2261
7+
unless os[:family] == 'redhat' && os[:release].to_i == 9
8+
describe 'apache::mod::php class', if: mod_supported_on_platform?('apache::mod::php') do
9+
context 'default php config' do
10+
pp = <<-MANIFEST
11+
class { 'apache':
12+
mpm_module => 'prefork',
13+
}
14+
class { 'apache::mod::php': }
15+
apache::vhost { 'php.example.com':
16+
port => '80',
17+
docroot => '#{apache_hash['doc_root']}/php',
18+
}
19+
host { 'php.example.com': ip => '127.0.0.1', }
20+
file { '#{apache_hash['doc_root']}/php/index.php':
21+
ensure => file,
22+
content => "<?php phpinfo(); ?>\\n",
23+
}
24+
MANIFEST
25+
it 'succeeds in puppeting php' do
26+
apply_manifest(pp, catch_failures: true)
5027
end
51-
elsif os[:family] == 'redhat' && os[:release] =~ %r{^(8)\b}
52-
describe file("#{apache_hash['mod_dir']}/php7.conf") do
53-
it { is_expected.to contain 'DirectoryIndex index.php' }
54-
end
55-
elsif os[:family] == 'sles' && os[:release].to_i >= 15
56-
describe file("#{apache_hash['mod_dir']}/php7.conf") do
57-
it { is_expected.to contain 'DirectoryIndex index.php' }
58-
end
59-
else
60-
describe file("#{apache_hash['mod_dir']}/php5.conf") do
61-
it { is_expected.to contain 'DirectoryIndex index.php' }
28+
29+
if os[:family] == 'debian' && os[:release] =~ %r{^9\.}
30+
describe file("#{apache_hash['mod_dir']}/php7.0.conf") do
31+
it { is_expected.to contain 'DirectoryIndex index.php' }
32+
end
33+
elsif os[:family] == 'debian' && os[:release] =~ %r{^10\.}
34+
describe file("#{apache_hash['mod_dir']}/php7.3.conf") do
35+
it { is_expected.to contain 'DirectoryIndex index.php' }
36+
end
37+
elsif os[:family] == 'debian' && os[:release] =~ %r{^11\.}
38+
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
39+
it { is_expected.to contain 'DirectoryIndex index.php' }
40+
end
41+
elsif os[:family] == 'ubuntu' && os[:release] == '18.04'
42+
describe file("#{apache_hash['mod_dir']}/php7.2.conf") do
43+
it { is_expected.to contain 'DirectoryIndex index.php' }
44+
end
45+
elsif os[:family] == 'ubuntu' && os[:release] == '20.04'
46+
describe file("#{apache_hash['mod_dir']}/php7.4.conf") do
47+
it { is_expected.to contain 'DirectoryIndex index.php' }
48+
end
49+
elsif os[:family] == 'redhat' && os[:release] =~ %r{^(9)\b}
50+
describe file("#{apache_hash['mod_dir']}/php.conf") do
51+
it { is_expected.to contain 'DirectoryIndex index.php' }
52+
end
53+
elsif os[:family] == 'redhat' && os[:release] =~ %r{^(8)\b}
54+
describe file("#{apache_hash['mod_dir']}/php7.conf") do
55+
it { is_expected.to contain 'DirectoryIndex index.php' }
56+
end
57+
elsif os[:family] == 'sles' && os[:release].to_i >= 15
58+
describe file("#{apache_hash['mod_dir']}/php7.conf") do
59+
it { is_expected.to contain 'DirectoryIndex index.php' }
60+
end
61+
else
62+
describe file("#{apache_hash['mod_dir']}/php5.conf") do
63+
it { is_expected.to contain 'DirectoryIndex index.php' }
64+
end
6265
end
6366
end
64-
end
6567

66-
context 'custom extensions, php_flag, php_value, php_admin_flag, and php_admin_value' do
67-
pp = <<-MANIFEST
68-
class { 'apache':
69-
mpm_module => 'prefork',
68+
context 'custom extensions, php_flag, php_value, php_admin_flag, and php_admin_value' do
69+
pp = <<-MANIFEST
70+
class { 'apache':
71+
mpm_module => 'prefork',
72+
}
73+
class { 'apache::mod::php':
74+
extensions => ['.php','.php5'],
7075
}
71-
class { 'apache::mod::php':
72-
extensions => ['.php','.php5'],
73-
}
7476
75-
apache::vhost { 'php.example.com':
76-
port => '80',
77-
docroot => '#{apache_hash['doc_root']}/php',
78-
php_values => { 'include_path' => '.:/usr/share/pear:/usr/bin/php', },
79-
php_flags => { 'display_errors' => 'on', },
80-
php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', },
81-
php_admin_flags => { 'engine' => 'on', },
82-
}
83-
host { 'php.example.com': ip => '127.0.0.1', }
84-
file { '#{apache_hash['doc_root']}/php/index.php5':
85-
ensure => file,
86-
content => "<?php phpinfo(); ?>\\n",
87-
}
88-
MANIFEST
89-
it 'succeeds in puppeting php' do
90-
apply_manifest(pp, catch_failures: true)
91-
end
77+
apache::vhost { 'php.example.com':
78+
port => '80',
79+
docroot => '#{apache_hash['doc_root']}/php',
80+
php_values => { 'include_path' => '.:/usr/share/pear:/usr/bin/php', },
81+
php_flags => { 'display_errors' => 'on', },
82+
php_admin_values => { 'open_basedir' => '/var/www/php/:/usr/share/pear/', },
83+
php_admin_flags => { 'engine' => 'on', },
84+
}
85+
host { 'php.example.com': ip => '127.0.0.1', }
86+
file { '#{apache_hash['doc_root']}/php/index.php5':
87+
ensure => file,
88+
content => "<?php phpinfo(); ?>\\n",
89+
}
90+
MANIFEST
91+
it 'succeeds in puppeting php' do
92+
apply_manifest(pp, catch_failures: true)
93+
end
9294

93-
describe file("#{apache_hash['vhost_dir']}/25-php.example.com.conf") do
94-
it { is_expected.to contain ' php_flag display_errors on' }
95-
it { is_expected.to contain ' php_value include_path ".:/usr/share/pear:/usr/bin/php"' }
96-
it { is_expected.to contain ' php_admin_flag engine on' }
97-
it { is_expected.to contain ' php_admin_value open_basedir /var/www/php/:/usr/share/pear/' }
95+
describe file("#{apache_hash['vhost_dir']}/25-php.example.com.conf") do
96+
it { is_expected.to contain ' php_flag display_errors on' }
97+
it { is_expected.to contain ' php_value include_path ".:/usr/share/pear:/usr/bin/php"' }
98+
it { is_expected.to contain ' php_admin_flag engine on' }
99+
it { is_expected.to contain ' php_admin_value open_basedir /var/www/php/:/usr/share/pear/' }
100+
end
98101
end
99102
end
100103
end

0 commit comments

Comments
 (0)