puppet-bind/spec/classes/chroot/package_spec.rb
Cédric Defortis 44bb1b0e0e First draft of chroot implementation for Debian
- RHEL chroot code has been moved into a bind::chroot::package class

- Debian family (and probably other families) can use the
  `bind::chroot::manual` class to enable chroot for bind using the method
  described here: https://wiki.debian.org/Bind9#Bind_Chroot
2018-02-19 09:19:22 +01:00

32 lines
936 B
Ruby

# ex: syntax=ruby ts=2 sw=2 si et
require 'spec_helper'
describe 'bind::chroot::package' do
on_supported_os.each do |os, facts|
context "on #{os}" do
# Only applies to RedHat Family for now:
next unless facts[:os]['family'] == 'RedHat'
let (:facts) {facts}
context "with defaults parameters" do
it { is_expected.to compile.with_all_deps }
it { is_expected.to contain_class('bind::defaults') }
it { is_expected.to contain_package('bind-chroot').with({ ensure: 'latest', }) }
it do
is_expected.to contain_service('bind-without-chroot').with({
ensure: 'stopped',
enable: false,
name: 'named'
})
end
it do
is_expected.to contain_service('bind').with({
ensure: 'running',
enable: true,
name: 'named-chroot'
})
end
end
end
end
end