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

SMQ-2546 - Add events to adapters #2659

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

felixgateru
Copy link
Contributor

@felixgateru felixgateru commented Jan 21, 2025

What type of PR is this?

This is a feature as it adds events to coap and ws and updates events in mqtt.

What does this do?

This pr adds publish, susbscribe and unsubscribe events to the adapters.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No

Did you document any new/modified feature?

Yes, in code docuementation is included

Notes

None

Signed-off-by: Felix Gateru <[email protected]>
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 17.53247% with 381 lines in your changes missing coverage. Please review.

Project coverage is 37.06%. Comparing base (3cb41fa) to head (0d1f132).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
ws/handler.go 0.00% 71 Missing ⚠️
coap/events/stream.go 0.00% 56 Missing ⚠️
mqtt/events/streams.go 0.00% 41 Missing ⚠️
ws/events/stream.go 0.00% 39 Missing ⚠️
ws/mocks/events.go 33.33% 22 Missing and 6 partials ⚠️
http/events/streams.go 0.00% 27 Missing ⚠️
coap/api/transport.go 0.00% 25 Missing ⚠️
mqtt/handler.go 53.48% 12 Missing and 8 partials ⚠️
mqtt/mocks/events.go 56.81% 8 Missing and 11 partials ⚠️
http/mocks/events.go 46.66% 10 Missing and 6 partials ⚠️
... and 6 more
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2659      +/-   ##
==========================================
- Coverage   43.87%   37.06%   -6.82%     
==========================================
  Files         350      113     -237     
  Lines       45718    16427   -29291     
==========================================
- Hits        20059     6088   -13971     
+ Misses      23438     9901   -13537     
+ Partials     2221      438    -1783     

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

@felixgateru felixgateru marked this pull request as ready for review January 22, 2025 10:30
@felixgateru felixgateru requested a review from a team as a code owner January 22, 2025 10:30
ws/handler.go Outdated
Comment on lines 263 to 268
switch {
case strings.HasPrefix(string(s.Password), "Client"):
token = strings.ReplaceAll(string(s.Password), "Client ", "")
default:
token = string(s.Password)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use extractClientSecret instead.

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.

2 participants