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 copying of request body: #348

Merged
merged 2 commits into from
Sep 19, 2023
Merged

Conversation

jacobweinstock
Copy link
Member

What does this PR implement/change/remove?

The request body was being dropped after the io.Copy causing issues with further reading of it. Add a PingMethod for the Open call. This way we send something for the client to interpret instead of nothing. Update tests.

Checklist

  • Tests added
  • Similar commits squashed

The HW vendor this change applies to (if applicable)

The HW model number, product name this change applies to (if applicable)

The BMC firmware and/or BIOS versions that this change applies to (if applicable)

What version of tooling - vendor specific or opensource does this change depend on (if applicable)

Description for changelog/release notes

@jacobweinstock jacobweinstock added the bug Something isn't working label Sep 19, 2023
@codecov
Copy link

codecov bot commented Sep 19, 2023

Codecov Report

Patch coverage: 77.27% and project coverage change: +0.03% 🎉

Comparison is base (c402b01) 44.52% compared to head (f6a3401) 44.55%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #348      +/-   ##
==========================================
+ Coverage   44.52%   44.55%   +0.03%     
==========================================
  Files          51       51              
  Lines        4108     4105       -3     
==========================================
  Hits         1829     1829              
+ Misses       2068     2066       -2     
+ Partials      211      210       -1     
Files Changed Coverage Δ
providers/rpc/payload.go 50.00% <ø> (ø)
providers/rpc/rpc.go 77.46% <68.75%> (ø)
providers/rpc/logging.go 100.00% <100.00%> (ø)

... and 1 file with indirect coverage changes

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

Copy link
Member

@joelrebel joelrebel left a comment

Choose a reason for hiding this comment

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

Does the example have to be updated to handle the ping request?

The request body was being dropped
after the io.Copy causing issues with
further reading of it.

Add a PingMethod for the Open call.
This way we send something for the
client to interpret instead of nothing.

Update tests.

Signed-off-by: Jacob Weinstock <[email protected]>
Signed-off-by: Jacob Weinstock <[email protected]>
@mergify mergify bot merged commit b9b7ef8 into bmc-toolbox:main Sep 19, 2023
@jacobweinstock jacobweinstock deleted the rpc-fixes branch September 19, 2023 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working ready-to-merge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants