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

Add proxy Body::collect_bytes for easier unit tests #1445

Merged
merged 6 commits into from
Apr 2, 2024
Merged

Conversation

clux
Copy link
Member

@clux clux commented Mar 26, 2024

Avoids people having to pull in http_body_util for the BodyExt

Tested with kube-rs/controller-rs#69 locally.

Avoids people having to pull in `http_body_util` for the `BodyExt`

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

codecov bot commented Mar 26, 2024

Codecov Report

Attention: Patch coverage is 0% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 72.1%. Comparing base (05d115b) to head (0a70c7d).

Additional details and impacted files
@@           Coverage Diff           @@
##            main   #1445     +/-   ##
=======================================
+ Coverage   72.1%   72.1%   +0.1%     
=======================================
  Files         78      78             
  Lines       6591    6592      +1     
=======================================
+ Hits        4747    4748      +1     
  Misses      1844    1844             
Files Coverage Δ
kube-client/src/client/body.rs 82.4% <0.0%> (-2.4%) ⬇️

... and 1 file with indirect coverage changes

@clux clux marked this pull request as ready for review March 26, 2024 17:47
@clux clux added the changelog-add changelog added category for prs label Mar 26, 2024
@clux clux changed the title Expose Body::collect for easier unit tests Add proxy Body::collect for easier unit tests Mar 26, 2024
@clux clux added this to the 0.90.0 milestone Mar 26, 2024
@clux clux changed the title Add proxy Body::collect for easier unit tests Add proxy Body::collect_bytes for easier unit tests Mar 28, 2024
Copy link
Contributor

@mateiidavid mateiidavid left a comment

Choose a reason for hiding this comment

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

Saw the change is pretty straightforward so I thought I'd jump in to help ship it. LGTM, left two small comments that imo shouldn't block under any circumstance.

kube-client/src/client/body.rs Outdated Show resolved Hide resolved
kube-client/src/client/body.rs Outdated Show resolved Hide resolved
clux and others added 2 commits April 2, 2024 19:01
Co-authored-by: Matei David <[email protected]>
Signed-off-by: Eirik A <[email protected]>
Co-authored-by: Matei David <[email protected]>
Signed-off-by: Eirik A <[email protected]>
@clux clux merged commit db7878e into main Apr 2, 2024
18 checks passed
@clux clux deleted the expose-body-collect branch April 2, 2024 18:43
@clux clux mentioned this pull request Apr 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
changelog-add changelog added category for prs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants