File tree 2 files changed +64
-15
lines changed
2 files changed +64
-15
lines changed Original file line number Diff line number Diff line change 24
24
notify => Service[' bind' ],
25
25
}
26
26
27
+ package {'bind-tools' :
28
+ ensure => latest,
29
+ name => $::bind::params::nsupdate_package ,
30
+ before => Package[' bind' ],
31
+ }
32
+
27
33
package { 'bind' :
28
34
ensure => latest,
29
35
name => $::bind::params::bind_package ,
Original file line number Diff line number Diff line change 2
2
require 'spec_helper'
3
3
4
4
describe 'bind' do
5
- let ( :facts ) { { :concat_basedir => '/wtf' } }
5
+ context "on a Debian OS" do
6
+ let :facts do
7
+ {
8
+ :concat_basedir => '/wtf' ,
9
+ :osfamily => 'Debian' ,
10
+ :operatingsystem => 'Debian'
11
+ }
12
+ end
13
+ it {
14
+ should contain_package ( 'bind-tools' ) . with ( {
15
+ 'ensure' => 'latest' ,
16
+ 'name' => 'dnsutils'
17
+ } ) . that_comes_before ( 'Package[bind]' )
18
+ }
19
+ it {
20
+ should contain_package ( 'bind' ) . with ( {
21
+ 'ensure' => 'latest' ,
22
+ 'name' => 'bind9'
23
+ } )
24
+ }
6
25
7
- it {
8
- should contain_package ( 'bind' ) . with ( {
9
- 'ensure' => 'latest' ,
10
- 'name' => 'bind9'
11
- } )
12
- }
26
+ it { should contain_file ( '_NAMEDCONF_' ) . that_requires ( 'Package[bind]' ) }
27
+ it { should contain_file ( '_NAMEDCONF_' ) . that_notifies ( 'Service[bind]' ) }
13
28
14
- it { should contain_file ( '_NAMEDCONF_' ) . that_requires ( 'Package[bind]' ) }
15
- it { should contain_file ( '_NAMEDCONF_' ) . that_notifies ( 'Service[bind]' ) }
29
+ it {
30
+ should contain_service ( 'bind' ) . with ( {
31
+ 'ensure' => 'running' ,
32
+ 'name' => 'bind9'
33
+ } )
34
+ }
35
+ end
36
+ context "on a RedHat OS" do
37
+ let :facts do
38
+ {
39
+ :concat_basedir => '/wtf' ,
40
+ :osfamily => 'RedHat' ,
41
+ :operatingsystem => 'CentOS'
42
+ }
43
+ end
44
+ it {
45
+ should contain_package ( 'bind-tools' ) . with ( {
46
+ 'ensure' => 'latest' ,
47
+ 'name' => 'bind-utils'
48
+ } )
49
+ }
50
+ it {
51
+ should contain_package ( 'bind' ) . with ( {
52
+ 'ensure' => 'latest' ,
53
+ 'name' => 'bind'
54
+ } )
55
+ }
16
56
17
- it {
18
- should contain_service ( 'bind' ) . with ( {
19
- 'ensure' => 'running' ,
20
- 'name' => 'bind9'
21
- } )
22
- }
57
+ it { should contain_file ( '_NAMEDCONF_' ) . that_requires ( 'Package[bind]' ) }
58
+ it { should contain_file ( '_NAMEDCONF_' ) . that_notifies ( 'Service[bind]' ) }
23
59
60
+ it {
61
+ should contain_service ( 'bind' ) . with ( {
62
+ 'ensure' => 'running' ,
63
+ 'name' => 'named'
64
+ } )
65
+ }
66
+ end
24
67
end
You can’t perform that action at this time.
0 commit comments