-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #432 from jlambert121/issue_428
allow allow_from to be set for mod_status
- Loading branch information
Showing
3 changed files
with
44 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
require 'spec_helper' | ||
|
||
describe 'apache::mod::status', :type => :class do | ||
let :pre_condition do | ||
'include apache' | ||
end | ||
|
||
let :facts do | ||
{ | ||
:osfamily => 'RedHat', | ||
:operatingsystemrelease => '6', | ||
:concat_basedir => '/dne', | ||
} | ||
end | ||
|
||
it { should contain_apache__mod('status') } | ||
|
||
context 'default' do | ||
it { should contain_file('status.conf').with_content(/Allow from 127\.0\.0\.1 ::1/) } | ||
end | ||
|
||
context 'custom allow_from (string)' do | ||
let :params do | ||
{ | ||
:allow_from => '1.2.3.4' | ||
} | ||
end | ||
it { should contain_file('status.conf').with_content(/Allow from 1\.2\.3\.4/) } | ||
end | ||
|
||
context 'custom allow_from (array)' do | ||
let :params do | ||
{ | ||
:allow_from => [ '1.2.3.4', '2.3.4.5' ] | ||
} | ||
end | ||
it { should contain_file('status.conf').with_content(/Allow from 1\.2\.3\.4 2\.3\.4\.5/) } | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters