Skip to content
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

Allow undef handlers and subscribers #531

Merged
merged 3 commits into from
Sep 17, 2016

Conversation

thejandroman
Copy link
Contributor

This commit fixes the error message: undefined methodsort' for
nil:NilClass. This error message can be seen when either the handlers or subscribers parameters are passed in asundef` in the check.pp
manifest.

The PRs that looks like they introduced this behavior are:
#285
#303

This commit fixes the error message: `undefined method `sort' for
nil:NilClass`. This error message can be seen when either the handlers
or subscribers parameters are passed in as  `undef` in the check.pp
manifest.

The PRs that looks like they introduced this behavior are:
sensu#285
sensu#303
@thejandroman
Copy link
Contributor Author

Rebased.

@jaxxstorm
Copy link
Contributor

Can you add a test for this?

@thejandroman
Copy link
Contributor Author

I sure can!

@thejandroman
Copy link
Contributor Author

I've added preliminary tests for subscribers and handlers but I'm having a hard time testing the exact scenario that causes this issue; namely passing in undef to the custom type. Any help or ideas on how to better test this would be appreciated.

@thejandroman
Copy link
Contributor Author

Also these tests weren't written with ruby 1.8.7 in mind... Looks like those are failing. Will revise.

@jaxxstorm
Copy link
Contributor

Awesome!

@jaxxstorm jaxxstorm merged commit 30036b0 into sensu:master Sep 17, 2016
@josephholsten josephholsten deleted the nil_sensu_check branch November 11, 2016 22:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants