Skip to content

Commit

Permalink
Merge pull request #987 from holser/master
Browse files Browse the repository at this point in the history
MODULES-1684: Specify mod_proxy_connect module for Apache >= 2.3.5
  • Loading branch information
igalic committed Feb 6, 2015
2 parents b8b15f7 + 83df471 commit 2f62ab1
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
8 changes: 8 additions & 0 deletions manifests/mod/proxy_connect.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
class apache::mod::proxy_connect (
$apache_version = $::apache::apache_version,
) {
if versioncmp($apache_version, '2.4') >= 0 {
Class['::apache::mod::proxy'] -> Class['::apache::mod::proxy_connect']
::apache::mod { 'proxy_connect': }
}
}
50 changes: 50 additions & 0 deletions spec/classes/mod/proxy_connect_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
require 'spec_helper'

describe 'apache::mod::proxy_connect', :type => :class do
let :pre_condition do
[
'include apache',
'include apache::mod::proxy',
]
end
context 'on a Debian OS' do
let :facts do
{
:osfamily => 'Debian',
:concat_basedir => '/dne',
:operatingsystem => 'Debian',
:id => 'root',
:kernel => 'Linux',
:path => '/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin',
}
end
context 'with Apache version < 2.4' do
let :facts do
super().merge({
:operatingsystemrelease => '7.0',
:lsbdistcodename => 'wheezy',
})
end
let :params do
{
:apache_version => '2.2',
}
end
it { is_expected.not_to contain_apache__mod('proxy_connect') }
end
context 'with Apache version >= 2.4' do
let :facts do
super().merge({
:operatingsystemrelease => '8.0',
:lsbdistcodename => 'jessie',
})
end
let :params do
{
:apache_version => '2.4',
}
end
it { is_expected.to contain_apache__mod('proxy_connect') }
end
end
end

0 comments on commit 2f62ab1

Please sign in to comment.