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

fix: use mocking MessageClient in unit tests #4999

Merged
merged 1 commit into from
Nov 8, 2024

Conversation

judehung
Copy link
Member

@judehung judehung commented Nov 8, 2024

As real implementation of NewMessageClient will require existing MQTT/NATS broker to access to, the unit tests should use Mocking MessageClient to avoid errors.

If your build fails due to your commit message not passing the build checks, please review the guidelines here: https://github.com/edgexfoundry/edgex-go/blob/main/.github/Contributing.md

PR Checklist

Please check if your PR fulfills the following requirements:

  • I am not introducing a breaking change (if you are, flag in conventional commit message with BREAKING CHANGE: describing the break)
  • I am not introducing a new dependency (add notes below if you are)
  • I have added unit tests for the new feature or bug fix (if not, why?)
  • I have fully tested (add details below) this the new feature or bug fix (if not, why?)
  • I have opened a PR for the related docs change (if not, why?)

Testing Instructions

New Dependency Instructions (If applicable)

As real implementation of NewMessageClient will require existing
MQTT/NATS broker to access to, the unit tests should use Mocking
MessageClient to avoid errors.

Signed-off-by: Jude Hung <jude@iotechsys.com>
Copy link

sonarqubecloud bot commented Nov 8, 2024

@judehung judehung requested a review from cloudxxx8 November 8, 2024 04:29
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 27.59%. Comparing base (94f98a2) to head (65742a1).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4999      +/-   ##
==========================================
- Coverage   27.60%   27.59%   -0.01%     
==========================================
  Files         245      245              
  Lines       17894    17894              
==========================================
- Hits         4939     4938       -1     
  Misses      11828    11828              
- Partials     1127     1128       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@cloudxxx8 cloudxxx8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@cloudxxx8 cloudxxx8 merged commit e5d1445 into edgexfoundry:main Nov 8, 2024
6 checks passed
@judehung judehung deleted the remove-redis-pubsub branch November 8, 2024 04:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants