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:
+14
-20
@@ -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
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'bind::updater' do
|
||||
it { should compile }
|
||||
it { should compile.with_all_deps }
|
||||
end
|
||||
Vendored
+2
@@ -0,0 +1,2 @@
|
||||
---
|
||||
bind::confdir: '_CONFDIR_'
|
||||
Vendored
+9
@@ -0,0 +1,9 @@
|
||||
---
|
||||
:hierarchy:
|
||||
- "tests/%{::test_config}"
|
||||
- common
|
||||
:backends:
|
||||
- yaml
|
||||
- module_data
|
||||
:yaml:
|
||||
:datadir: 'spec/fixtures/hiera'
|
||||
@@ -1 +1,14 @@
|
||||
require 'puppetlabs_spec_helper/module_spec_helper'
|
||||
require 'fixtures/modules/module_data/lib/hiera/backend/module_data_backend.rb'
|
||||
|
||||
RSpec.configure do |c|
|
||||
c.default_facts = {
|
||||
:osfamily => 'Debian',
|
||||
:operatingsystem => 'Debian',
|
||||
:lsbdistcodename => 'wheezy',
|
||||
:architecture => 'amd64',
|
||||
:kernel => 'Linux',
|
||||
:test_config => 'default'
|
||||
}
|
||||
c.hiera_config = File.join('spec', 'fixtures', 'hiera', 'hiera.yaml')
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user