Skip to content

Commit c2d7b9d

Browse files
authored
Merge pull request #2135 from martijndegouw/davsvndeb10
Fix dav_svn for Debian 10
2 parents 72a6705 + 1498149 commit c2d7b9d

File tree

3 files changed

+43
-8
lines changed

3 files changed

+43
-8
lines changed

manifests/mod/dav_svn.pp

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,11 @@
2121

2222
::apache::mod { 'dav_svn': }
2323

24-
if $::osfamily == 'Debian' and ! ($::operatingsystemmajrelease in ['6', '9', '16.04', '18.04']) {
25-
$loadfile_name = undef
26-
} else {
27-
$loadfile_name = 'dav_svn_authz_svn.load'
28-
}
29-
3024
if $authz_svn_enabled {
3125
::apache::mod { 'authz_svn':
32-
loadfile_name => $loadfile_name,
26+
# authz_svn depends on symbols from the dav_svn module,
27+
# therefore, make sure authz_svn is loaded after dav_svn.
28+
loadfile_name => 'dav_svn_authz_svn.load',
3329
require => Apache::Mod['dav_svn'],
3430
}
3531
}

spec/acceptance/mod_dav_svn_spec.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# frozen_string_literal: true
2+
3+
require 'spec_helper_acceptance'
4+
5+
describe 'apache::mod::dav_svn class' do
6+
context 'dav_svn module with authz_svn disabled' do
7+
pp = <<-MANIFEST
8+
class { 'apache': }
9+
class { 'apache::mod::dav_svn':
10+
authz_svn_enabled => false,
11+
}
12+
MANIFEST
13+
14+
it 'applies with no errors' do
15+
apply_manifest(pp, catch_failures: true)
16+
end
17+
18+
it 'applies a second time without changes' do
19+
apply_manifest(pp, catch_changes: true)
20+
end
21+
end
22+
23+
context 'dav_svn module with authz_svn enabled' do
24+
pp = <<-MANIFEST
25+
class { 'apache': }
26+
class { 'apache::mod::dav_svn':
27+
authz_svn_enabled => true,
28+
}
29+
MANIFEST
30+
31+
it 'applies with no errors' do
32+
apply_manifest(pp, catch_failures: true)
33+
end
34+
35+
it 'applies a second time without changes' do
36+
apply_manifest(pp, catch_changes: true)
37+
end
38+
end
39+
end

spec/classes/mod/dav_svn_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
it { is_expected.to contain_apache__mod('dav_svn') }
2525
it { is_expected.to contain_package('libapache2-svn') }
2626
it { is_expected.to contain_apache__mod('authz_svn') }
27-
it { is_expected.to contain_file('authz_svn.load').with_content(%r{LoadModule authz_svn_module}) }
27+
it { is_expected.to contain_file('dav_svn_authz_svn.load').with_content(%r{LoadModule authz_svn_module}) }
2828
end
2929
end
3030
context 'on a RedHat OS' do

0 commit comments

Comments
 (0)