bmc-toolbox / bmclib

Library to abstract Baseboard Management Controller interaction
Apache License 2.0
193 stars 36 forks source link

Fix copying of request body: #348

Closed jacobweinstock closed 1 year ago

jacobweinstock commented 1 year ago

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

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

codecov[bot] commented 1 year ago

Codecov Report

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

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

Additional details and impacted files ```diff @@ 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](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/348?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox) | Coverage Δ | | |---|---|---| | [providers/rpc/payload.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/348?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JwYy9wYXlsb2FkLmdv) | `50.00% <ø> (ø)` | | | [providers/rpc/rpc.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/348?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JwYy9ycGMuZ28=) | `77.46% <68.75%> (ø)` | | | [providers/rpc/logging.go](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/348?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox#diff-cHJvdmlkZXJzL3JwYy9sb2dnaW5nLmdv) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/bmc-toolbox/bmclib/pull/348/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=bmc-toolbox)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.