|
1 | 1 | require 'spec_helper' |
2 | 2 |
|
3 | 3 | describe 'statsd', :type => :class do |
4 | | - |
5 | 4 | ['Debian', 'RedHat'].each do |osfamily| |
6 | 5 | context "using #{osfamily}" do |
7 | 6 | let(:facts) { { |
8 | 7 | :osfamily => osfamily |
9 | 8 | } } |
10 | 9 |
|
11 | 10 | it { should contain_class('statsd') } |
| 11 | + it { should contain_class('statsd::backends') } |
| 12 | + it { should contain_class('statsd::config') } |
12 | 13 | it { should contain_class('statsd::params') } |
13 | | - it { should contain_statsd__backends } |
14 | | - it { should contain_statsd__config } |
15 | 14 | it { should contain_package('statsd').with_ensure('present') } |
16 | 15 | it { should contain_service('statsd').with_ensure('running') } |
17 | 16 | it { should contain_service('statsd').with_enable(true) } |
|
31 | 30 | it { should contain_file('/etc/init.d/statsd') } |
32 | 31 | end |
33 | 32 |
|
| 33 | + describe 'disabling the management of backends' do |
| 34 | + let(:params) {{ |
| 35 | + :manage_backends => false, |
| 36 | + }} |
| 37 | + it { should_not contain_class('statsd::backends') } |
| 38 | + end |
| 39 | + |
34 | 40 | describe 'stopping the statsd service' do |
35 | | - let(:params) {{ |
36 | | - :service_ensure => 'stopped', |
| 41 | + let(:params) {{ |
| 42 | + :service_ensure => 'stopped', |
37 | 43 | }} |
38 | 44 | it { should contain_service('statsd').with_ensure('stopped') } |
39 | 45 | end |
40 | 46 |
|
41 | 47 | describe 'disabling the statsd service' do |
42 | | - let(:params) {{ |
43 | | - :service_enable => false, |
| 48 | + let(:params) {{ |
| 49 | + :service_enable => false, |
44 | 50 | }} |
45 | 51 | it { should contain_service('statsd').with_enable(false) } |
46 | 52 | end |
47 | 53 |
|
48 | 54 | describe 'disabling the management of the statsd service' do |
49 | | - let(:params) {{ |
50 | | - :manage_service => false, |
| 55 | + let(:params) {{ |
| 56 | + :manage_service => false, |
51 | 57 | }} |
52 | 58 | it { should_not contain_service('statsd') } |
53 | 59 | end |
54 | 60 | end |
55 | 61 | end |
56 | | - |
57 | 62 | end |
0 commit comments