-
Notifications
You must be signed in to change notification settings - Fork 229
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
test(services): expand services test coverage #389
Conversation
Most services are testing by mocking them. To unify the way how and where these mocks are being generated, I added the mock command. The command executes go generate against all subdirectories internally. For this to work every service needs a go:generate comment that defines the mockery command to be executed. For examples, check 'service/amazonses/amazon_ses.go#14'. All newly added tests should make use of this pattern.
Codecov ReportBase: 55.91% // Head: 61.64% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #389 +/- ##
==========================================
+ Coverage 55.91% 61.64% +5.73%
==========================================
Files 21 29 +8
Lines 719 975 +256
==========================================
+ Hits 402 601 +199
- Misses 286 322 +36
- Partials 31 52 +21
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
Co-authored-by: Stefanos Valoumas <[email protected]>
Co-authored-by: Stefanos Valoumas <[email protected]>
Description
Took the time and added some more mocks and tests. Added mocks and tests for 4 services (
msteams
,amazonses
,discord
,slack
).Also added a new make command, namely
mock
. All mock does is wrapgo generate ./...
. Services from now on should include a line similar to this. This unifys the way that mocks are being generated and allows for quick re-generation of said mocks. Over time, additionally to adding more tests in general, more of the "older" tests should adapt this behavior, too.Motivation and Context
Since
Notify
should ideally have as close to 100% test coverage as possible, this is a step that brings us closer to that goal.How Has This Been Tested?
Ran the tests locally multiple times.
Types of changes
Checklist:
cc @svaloumas