Skip to content

Commit 4790352

Browse files
committed
Added extra tests to catch JSON configuration error.
1 parent 5b7047d commit 4790352

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

spec/defines/sensu_extension_spec.rb

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
:source => 'puppet:///somewhere/mycommand.rb'
99
} }
1010
it { should contain_file('/etc/sensu/extensions/mycommand.rb').with_source('puppet:///somewhere/mycommand.rb')}
11+
it { should contain_file('/etc/sensu/conf.d/extensions/myextension.json') }
1112
it { should contain_sensu_extension('myextension').with(
1213
:ensure => 'present',
1314
:config => {}
@@ -21,6 +22,7 @@
2122
:source => 'puppet:///somewhere/mycommand.rb'
2223
} }
2324
it { should contain_sensu_extension('myextension').with_ensure('absent') }
25+
it { should contain_file('/etc/sensu/conf.d/extensions/myextension.json').with_ensure('absent') }
2426
end
2527

2628
context 'install path' do

0 commit comments

Comments
 (0)