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

test(services): apply mock and naming conventions #391

Merged

Conversation

svaloumas
Copy link
Collaborator

@svaloumas svaloumas commented Sep 12, 2022

Description

Since we have adopted some mocking generation and naming conventions after merging this PR, it would be nice to apply those conventions to the rest of the test files to be consistent.
This PR adds some missing constructor tests to the services, renames the test functions accordingly, and replaces the mock files with new ones, generated by make mock.

Motivation and Context

How Has This Been Tested?

Run the tests locally multiple times.

Screenshots / Output (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation (no code change)
  • Refactor (refactoring production code)
  • Other

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@svaloumas svaloumas marked this pull request as draft September 12, 2022 12:06
@svaloumas svaloumas changed the title testapply mock and naming conventions in tests test: apply mock and naming conventions in tests Sep 12, 2022
@svaloumas svaloumas changed the title test: apply mock and naming conventions in tests test(services): apply mock and naming conventions Sep 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Sep 12, 2022

Codecov Report

Base: 61.64% // Head: 63.55% // Increases project coverage by +1.91% 🎉

Coverage data is based on head (b8bf94f) compared to base (6ed1684).
Patch coverage: 42.51% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #391      +/-   ##
==========================================
+ Coverage   61.64%   63.55%   +1.91%     
==========================================
  Files          29       30       +1     
  Lines         975     1029      +54     
==========================================
+ Hits          601      654      +53     
+ Misses        322      316       -6     
- Partials       52       59       +7     
Impacted Files Coverage Δ
service/fcm/fcm.go 90.00% <ø> (+14.00%) ⬆️
service/lark/common.go 100.00% <ø> (ø)
service/plivo/plivo.go 90.38% <ø> (ø)
service/syslog/mock_syslog_writer.go 53.12% <0.00%> (ø)
service/syslog/syslog.go 92.00% <ø> (ø)
service/twilio/twilio.go 92.00% <ø> (+36.00%) ⬆️
service/wechat/mock_wechat_message_manager.go 43.75% <0.00%> (ø)
service/wechat/wechat.go 34.56% <ø> (+19.75%) ⬆️
service/whatsapp/whatsapp.go 22.12% <ø> (+5.30%) ⬆️
service/whatsapp/mock_whatsapp_client.go 18.51% <18.51%> (ø)
... and 11 more

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.
📢 Do you have feedback about the report comment? Let us know in this issue.

@svaloumas svaloumas marked this pull request as ready for review September 12, 2022 12:19
service/amazonsns/amazon_sns.go Outdated Show resolved Hide resolved
@nikoksr nikoksr self-requested a review September 12, 2022 14:57
@nikoksr
Copy link
Owner

nikoksr commented Sep 12, 2022

@svaloumas no idea why codecov is complaining. Overall test coverage apparently even increased - let's ignore this. Merge when you're ready.

@svaloumas svaloumas merged commit bda5705 into nikoksr:main Sep 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants