Skip to content

Commit 9f35d28

Browse files
author
Morgan Haskel
committed
Merge pull request #696 from baurmatt/master
Added support for SVN authentication (mod_authz_svn)
2 parents f4eb4fa + d4dbd9b commit 9f35d28

3 files changed

Lines changed: 69 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ There are many `apache::mod::[name]` classes within this module that can be decl
442442
* `cgid`
443443
* `dav`
444444
* `dav_fs`
445-
* `dav_svn`
445+
* `dav_svn`*
446446
* `deflate`
447447
* `dev`
448448
* `dir`*

manifests/mod/dav_svn.pp

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1-
class apache::mod::dav_svn {
2-
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
3-
include ::apache::mod::dav
4-
::apache::mod { 'dav_svn': }
1+
class apache::mod::dav_svn (
2+
$authz_svn_enabled = false,
3+
) {
4+
Class['::apache::mod::dav'] -> Class['::apache::mod::dav_svn']
5+
include ::apache::mod::dav
6+
::apache::mod { 'dav_svn': }
7+
8+
if $authz_svn_enabled {
9+
::apache::mod { 'authz_svn':
10+
loadfile_name => 'dav_svn_authz_svn.load',
11+
require => Apache::Mod['dav_svn'],
12+
}
13+
}
514
}
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
require 'spec_helper_acceptance'
2+
3+
describe 'apache::mod::dav_svn class' do
4+
case fact('osfamily')
5+
when 'Debian'
6+
mod_dir = '/etc/apache2/mods-available'
7+
service_name = 'apache2'
8+
when 'RedHat'
9+
mod_dir = '/etc/httpd/conf.d'
10+
service_name = 'httpd'
11+
when 'FreeBSD'
12+
mod_dir = '/usr/local/etc/apache22/Modules'
13+
service_name = 'apache22'
14+
end
15+
16+
context "default dav_svn config" do
17+
it 'succeeds in puppeting dav_svn' do
18+
pp= <<-EOS
19+
class { 'apache': }
20+
include apache::mod::dav_svn
21+
EOS
22+
apply_manifest(pp, :catch_failures => true)
23+
end
24+
25+
describe service(service_name) do
26+
it { should be_enabled }
27+
it { should be_running }
28+
end
29+
30+
describe file("#{mod_dir}/dav_svn.load") do
31+
it { should contain "LoadModule dav_svn_module" }
32+
end
33+
end
34+
35+
context "dav_svn with enabled authz_svn config" do
36+
it 'succeeds in puppeting dav_svn' do
37+
pp= <<-EOS
38+
class { 'apache': }
39+
class { 'apache::mod::dav_svn':
40+
authz_svn_enabled => true,
41+
}
42+
EOS
43+
apply_manifest(pp, :catch_failures => true)
44+
end
45+
46+
describe service(service_name) do
47+
it { should be_enabled }
48+
it { should be_running }
49+
end
50+
51+
describe file("#{mod_dir}/authz_svn.load") do
52+
it { should contain "LoadModule authz_svn_module" }
53+
end
54+
end
55+
end

0 commit comments

Comments
 (0)