New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add handle_silenced parameter to handler defined type #753
Changes from all commits
4d3b853
6cf0984
5ea481d
bf0e8e5
60947ec
a4ed677
2f12bcc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -177,4 +177,19 @@ | |
it { should contain_sensu_handler('myhandler').with_handle_flapping( true ) } | ||
end | ||
|
||
context 'handle_silenced' do | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. we also need a test for when this is false There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added another spec to confirm that There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've now also added a spec to check when |
||
let(:params) { { :command => 'mycommand.rb', :type => 'pipe', :handle_silenced => true } } | ||
it { should contain_sensu_handler('myhandler').with_handle_silenced( true ) } | ||
end | ||
|
||
context 'handle_silenced set to false' do | ||
let(:params) { { :command => 'mycommand.rb', :type => 'pipe', :handle_silenced => false } } | ||
it { should contain_sensu_handler('myhandler').with_handle_silenced( false ) } | ||
end | ||
|
||
context 'handle_silenced set to default' do | ||
let(:params) { { :command => 'mycommand.rb', :type => 'pipe' } } | ||
it { should contain_sensu_handler('myhandler').with_handle_silenced( false ) } | ||
end | ||
|
||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please add an example to https://github.com/sensu/sensu-puppet/blob/master/tests/sensu-server.pp and document which file should be modified what json should be expected. That way we can functionally test this behaves as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added that in d05b1c7, wasn't quite sure how to go about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!