Fix spec tests for bind::chroot::manual
- Only works for facts[:os]['name'] == Debian and major > 7 - Declare class ::bind with correct parameters when spec testing bind::chroot::manual
This commit is contained in:
parent
1ea5d96d6b
commit
5870f37f27
@ -2,10 +2,26 @@
|
|||||||
require 'spec_helper'
|
require 'spec_helper'
|
||||||
|
|
||||||
describe 'bind::chroot::manual' do
|
describe 'bind::chroot::manual' do
|
||||||
|
let(:pre_condition) do
|
||||||
|
"
|
||||||
|
class { 'bind':
|
||||||
|
chroot => true,
|
||||||
|
default_zones_include => '/etc/named/default-zones.conf',
|
||||||
|
forwarders => [
|
||||||
|
'8.8.8.8',
|
||||||
|
'8.8.4.4',
|
||||||
|
],
|
||||||
|
dnssec => true,
|
||||||
|
version => 'Controlled by Puppet',
|
||||||
|
}
|
||||||
|
"
|
||||||
|
end
|
||||||
on_supported_os.each do |os, facts|
|
on_supported_os.each do |os, facts|
|
||||||
context "on #{os}" do
|
context "on #{os}" do
|
||||||
# Only applies to Debian Family for now:
|
# Only applies to Debian Family for now:
|
||||||
next unless facts[:os]['family'] == 'Debian'
|
next if facts[:os]['family'] != 'Debian'
|
||||||
|
next if facts[:os]['name'] != 'Debian'
|
||||||
|
next if facts[:os]['name'] == 'Debian' and facts[:os]['release']['major'].to_i < 8
|
||||||
let (:facts) {facts}
|
let (:facts) {facts}
|
||||||
context "with defaults parameters" do
|
context "with defaults parameters" do
|
||||||
it { is_expected.to compile.with_all_deps }
|
it { is_expected.to compile.with_all_deps }
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user