Make it all work again.

Previous iterations and even a release were all broken. The module works again,
sorry for the interlude.

- Giving up on params and moving to module_data (WIP)
- Change the Package and Service references to the static 'bind' name
- Add a meager amount of test coverage
This commit is contained in:
Nate Riffe
2015-01-08 08:09:32 -06:00
parent f7740f2a05
commit 7a74314a1e
21 changed files with 156 additions and 88 deletions
+14 -20
View File
@@ -3,28 +3,22 @@ require 'spec_helper'
describe 'bind' do
let(:facts) { { :concat_basedir => '/wtf' } }
let(:params) { { :confdir => '_CONFDIR_' } }
it {
should contain_package('bind').with({
'ensure' => 'latest',
'name' => 'bind9'
})
}
context 'on Debian-derived systems' do
let(:facts) { super().merge({ :osfamily => 'Debian' }) }
it {
should contain_package('bind').with({
'ensure' => 'latest',
'name' => 'bind9'
})
}
it { should contain_file('_CONFDIR_/named.conf').that_requires('Package[bind]') }
it { should contain_file('_CONFDIR_/named.conf').that_notifies('Service[bind]') }
it { should contain_file('_CONFDIR_/named.conf').that_requires('Package[bind]') }
it { should contain_file('_CONFDIR_/named.conf').that_notifies('Service[bind]') }
it {
should contain_service('bind').with({
'ensure' => 'running',
'name' => 'bind9'
})
}
end
it {
should contain_service('bind').with({
'ensure' => 'running',
'name' => 'bind9'
})
}
end
+6
View File
@@ -0,0 +1,6 @@
require 'spec_helper'
describe 'bind::updater' do
it { should compile }
it { should compile.with_all_deps }
end