Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add package parameters to the dav_svn mod. #750

Merged
merged 1 commit into from
Jun 30, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion manifests/mod/dav_svn.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@

if $authz_svn_enabled {
::apache::mod { 'authz_svn':
loadfile_name => 'dav_svn_authz_svn.load',
loadfile_name => $::osfamily ? {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is broken in Debian this needs to be updated with a selector or something, maybe

loadfile_name => $::osfamily ? {
  'Debian' => undef,
  default  => 'dav_svn_authz_svn.load',
},

At least on RHEL-based systems httpd wouldn't start without the loadfile_name due to authz_svn being loaded before dav_svn.

'Debian' => undef,
default => 'dav_svn_authz_svn.load',
},
require => Apache::Mod['dav_svn'],
}
}
Expand Down
17 changes: 10 additions & 7 deletions spec/acceptance/mod_dav_svn_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@
describe 'apache::mod::dav_svn class' do
case fact('osfamily')
when 'Debian'
mod_dir = '/etc/apache2/mods-available'
service_name = 'apache2'
mod_dir = '/etc/apache2/mods-available'
service_name = 'apache2'
authz_svn_load_file = 'authz_svn.load'
when 'RedHat'
mod_dir = '/etc/httpd/conf.d'
service_name = 'httpd'
mod_dir = '/etc/httpd/conf.d'
service_name = 'httpd'
authz_svn_load_file = 'dav_svn_authz_svn.load'
when 'FreeBSD'
mod_dir = '/usr/local/etc/apache22/Modules'
service_name = 'apache22'
mod_dir = '/usr/local/etc/apache22/Modules'
service_name = 'apache22'
authz_svn_load_file = 'dav_svn_authz_svn.load'
end

context "default dav_svn config" do
Expand Down Expand Up @@ -48,7 +51,7 @@ class { 'apache::mod::dav_svn':
it { is_expected.to be_running }
end

describe file("#{mod_dir}/dav_svn_authz_svn.load") do
describe file("#{mod_dir}/#{authz_svn_load_file}") do
it { is_expected.to contain "LoadModule authz_svn_module" }
end
end
Expand Down