-
Notifications
You must be signed in to change notification settings - Fork 3
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
Invalid custom plugin output target is not handled correctly #267
Labels
Milestone
Comments
atc0005
added
bug
Something isn't working
output/plugin
plugin output intended for monitoring system ingest
labels
Oct 17, 2024
atc0005
added a commit
that referenced
this issue
Oct 17, 2024
New tests: - `TestPluginSetOutputTargetIsValidWithValidInput` - basic assertion to show that the method works as intended with valid/expected input - TestPluginSetOutputTargetIsValidWithInvalidInput - asserts that when given an invalid output target that the default/fallback output target is used instead The second test is currently failing, highlighting the logic bug currently affecting the `Plugin.SetOutputTarget` method. refs GH-267
atc0005
added a commit
that referenced
this issue
Oct 17, 2024
Correctly fallback to default output target when an invalid output target is provided. refs GH-267
atc0005
added a commit
that referenced
this issue
Oct 17, 2024
New tests: - `TestPluginSetOutputTargetIsValidWithValidInput` - basic assertion to show that the method works as intended with valid/expected input - TestPluginSetOutputTargetIsValidWithInvalidInput - asserts that when given an invalid output target that the default/fallback output target is used instead The second test is currently failing, highlighting the logic bug currently affecting the `Plugin.SetOutputTarget` method. refs GH-267
atc0005
added a commit
that referenced
this issue
Oct 17, 2024
Correctly fallback to default output target when an invalid output target is provided. refs GH-267
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
I spotted this while working on #264:
go-nagios/nagios.go
Lines 398 to 407 in 55589e5
The nil handling check should return early to prevent the custom (invalid) value from being used as the output target.
The text was updated successfully, but these errors were encountered: