Skip to content

Commit e1c18d1

Browse files
committed
Replace RedHat 5 specs with RedHat 8
Red Hat 5 is EOL and not supported according to metadata.json while Red Hat 8 is supported.
1 parent 54ad2fd commit e1c18d1

File tree

3 files changed

+6
-19
lines changed

3 files changed

+6
-19
lines changed

spec/classes/apache_spec.rb

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -252,8 +252,8 @@
252252
end
253253
end
254254

255-
context 'on a RedHat 5 OS' do
256-
include_examples 'RedHat 5'
255+
context 'on a RedHat 8 OS' do
256+
include_examples 'RedHat 8'
257257

258258
it { is_expected.to contain_class('apache::params') }
259259
it {
@@ -301,7 +301,7 @@
301301
end
302302

303303
# Assert that load files are placed for these mods, but no conf file.
304-
['auth_basic', 'authn_file', 'authz_default', 'authz_groupfile', 'authz_host', 'authz_user', 'dav', 'env'].each do |modname|
304+
['auth_basic', 'authn_file', 'authz_groupfile', 'authz_host', 'authz_user', 'dav', 'env'].each do |modname|
305305
it {
306306
is_expected.to contain_file("#{modname}.load").with_path(
307307
"/etc/httpd/mod.d/#{modname}.load",
@@ -328,7 +328,7 @@
328328
}
329329
end
330330

331-
it { is_expected.to contain_file('/etc/httpd/conf/httpd.conf').with_content %r{^Include "/etc/httpd/site\.d/\*"$} }
331+
it { is_expected.to contain_file('/etc/httpd/conf/httpd.conf').with_content %r{^IncludeOptional "/etc/httpd/site\.d/\*"$} }
332332
it { is_expected.to contain_file('/etc/httpd/conf/httpd.conf').with_content %r{^Include "/etc/httpd/mod\.d/\*\.conf"$} }
333333
it { is_expected.to contain_file('/etc/httpd/conf/httpd.conf').with_content %r{^Include "/etc/httpd/mod\.d/\*\.load"$} }
334334
end

spec/classes/service_spec.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,8 @@
9595
end
9696
end
9797

98-
context 'on a RedHat 5 OS, do not manage service' do
99-
include_examples 'RedHat 5'
98+
context 'on a RedHat 8 OS, do not manage service' do
99+
include_examples 'RedHat 8'
100100
let(:params) do
101101
{
102102
'service_ensure' => 'running',

spec/spec_helper_local.rb

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,19 +55,6 @@
5555
end
5656
end
5757

58-
shared_context 'RedHat 5' do
59-
let :facts do
60-
{
61-
id: 'root',
62-
kernel: 'Linux',
63-
osfamily: 'RedHat',
64-
operatingsystem: 'RedHat',
65-
operatingsystemrelease: '5',
66-
path: '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
67-
}
68-
end
69-
end
70-
7158
shared_context 'RedHat 6' do
7259
let(:facts) { on_supported_os['redhat-6-x86_64'] }
7360
end

0 commit comments

Comments
 (0)