magistrala
magistrala copied to clipboard
MF-1623 - Bring back WebSocket Adapter
Signed-off-by: AryanGodara [email protected]
What does this do?
This pull request brings back the WebSocket adapter
Which issue(s) does this PR fix/relate to?
Resolves #1623
List any changes that modify/break current functionality
Nil
Have you included tests for your changes?
Yes
Did you document any new/modified functionality?
Yes
Notes
N/A
Codecov Report
Merging #1625 (0254241) into master (2e02991) will decrease coverage by
0.04%
. The diff coverage is66.49%
.
@@ Coverage Diff @@
## master #1625 +/- ##
==========================================
- Coverage 68.95% 68.91% -0.05%
==========================================
Files 138 143 +5
Lines 11350 11544 +194
==========================================
+ Hits 7826 7955 +129
- Misses 2830 2888 +58
- Partials 694 701 +7
Impacted Files | Coverage Δ | |
---|---|---|
ws/api/logging.go | 0.00% <0.00%> (ø) |
|
ws/client.go | 66.66% <66.66%> (ø) |
|
ws/api/endpoints.go | 76.34% <76.34%> (ø) |
|
ws/adapter.go | 91.11% <91.11%> (ø) |
|
ws/api/transport.go | 100.00% <100.00%> (ø) |
:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more
It seems to be working now, Manual Test:
$make run
$ ./mainflux-cli provision test (To get readymade thing and channel, that are connected (saves time on doing manually)
$ go run cmd/main.go (server starts listening)
$ go run cmd/ws_client.go (ws connection successful)
$ ./coap-cli-linux get channels/CHANNELID/messages --auth THINGKEY -o (Start listening on coap, to check if there is error with only ws-adapter, or in general error with sending messages)
$ curl -s -S -i -X POST -H "Content-Type: application/senml+json" -H "Authorization: Thing THINGKEY" https://localhost/http/channels/CHANNELID/messages -d '[{"random":"message}]'
OUTPUT:- received the message on both cli and ws terminal windows (tried multiple times)
@AryanGodara Please, update your branch and remove draft tag when the PR is ready
@manuio this one seems to be ready. PLease review and approve if OK.