-
Notifications
You must be signed in to change notification settings - Fork 112
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 #40 from n1tr0g/master
Solved Syntax error at 'inherits' in ::dns::server::options.pp:18
- Loading branch information
Showing
3 changed files
with
51 additions
and
8 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
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,37 @@ | ||
require 'spec_helper' | ||
|
||
describe 'dns::server::options', :type => :define do | ||
let :pre_condition do | ||
'class { "::dns::server": }' | ||
end | ||
|
||
let(:facts) { { :osfamily => 'Debian', :concat_basedir => '/tmp' } } | ||
|
||
let(:title) { '/etc/bind/named.conf.options' } | ||
|
||
context 'passing valid array to forwarders' do | ||
let :params do | ||
{ :forwarders => [ '8.8.8.8', '4.4.4.4' ] } | ||
end | ||
|
||
it { should contain_file('/etc/bind/named.conf.options') } | ||
it { should contain_file('/etc/bind/named.conf.options').with_content(/8\.8\.8\.8;$/) } | ||
it { should contain_file('/etc/bind/named.conf.options').with_content(/4\.4\.4\.4;$/) } | ||
it { should contain_file('/etc/bind/named.conf.options').with_ensure("present") } | ||
it { should contain_file('/etc/bind/named.conf.options').with_owner("bind") } | ||
it { should contain_file('/etc/bind/named.conf.options').with_group("bind") } | ||
|
||
end | ||
|
||
context 'passing a string to forwarders' do | ||
let :params do | ||
{ :forwarders => '8.8.8.8' } | ||
end | ||
|
||
it 'should fail input validation' do | ||
expect { subject }.to raise_error(Puppet::Error, /is not an Array/) | ||
end | ||
end | ||
|
||
end | ||
|