Graylog2 / Graylog2/graylog-plugin-integrations

update unit test for build custom message

Open
#610 0 comments 0 reactions 1 assignee Claimed by @lingpri View on GitHub
slack-plugin
Dominant language
Java
Stars
17
Forks
14
PR merge metrics
No merged PRs in 30d

Description

Your test only covers the behavior of the `buildCustomMessage` method. What I'm saying is that `buildCustomMessage` throws a `PermanentEventNotificationException` which then gets caught by the try/catch block in `execute` and replaced with a `TemporaryEventNotificationException`. If you believe it is right to throw a `PermanentEventNotificationException` here, then your try/catch block in `execute` should specifically catch `PermanentEventNotificationException` and re-throw it rather than wrapping it in a `TemporaryEventNotificationException`.

_Originally posted by @waab76 in https://github.com/Graylog2/graylog-plugin-integrations/pull/595#discussion_r512240760_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.