-
Notifications
You must be signed in to change notification settings - Fork 58
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
Migrate logging to use RPC Logging methods #102
Conversation
Codecov Report
@@ Coverage Diff @@
## master #102 +/- ##
==========================================
+ Coverage 40.28% 40.74% +0.46%
==========================================
Files 6 6
Lines 561 562 +1
==========================================
+ Hits 226 229 +3
Misses 313 313
+ Partials 22 20 -2
Continue to review full report at Codecov.
|
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.
While touching the code it would be great to get some improvements in. Let me know if you are fine refining the code a bit more
@mo2menelzeiny Regarding your question on #99 (comment): No there are no test that cover these lines of code. FYI: You can see which lines are covered by running Manually testing is quite hard, as the failure cases are hard to produce. |
@hanzei awesome, I will work on the requested refinements In regards to the test coverage, I noticed that all the cases where there's a check on an error object are not covered in the unit tests, is this intentional? Also I started writing some tests for |
No that is not intentional, this are just missing tests 😉 |
Mocking is one way of testing, another would be to just test the error case. In this case an invalid |
Used logging fields Added tests for config errors Added meaningful messages to channel and team errors
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.
Heads up that there is a conflict to resolve
…ost-community#93) * Add the concept of plugin admins * Review fixes mattermost-community#1 Co-Authored-By: Jason Frerich <[email protected]> * Review fixes mattermost-community#2 Co-authored-by: Jason Frerich <[email protected]>
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.
Nice 👍
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.
Nice!
@DHaussermann this can use a general smoke test (and maybe checking that at least some errors are actually logged?) - perhaps bundled in with the release test? |
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.
@mo2menelzeiny Thanks for this enhancment!
I did some regression testing of this PR. No issues found.
As mentioned above, it seems difficult to hit these cases and see the actual logging occur.
LGTM!
@levb I agree we should merge this.
awesome job guys, thank you! |
Summary
Migrates logging to use API Logging
Ticket Link
Closes #99