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

Improve bodyWrapper Rewind test #377

Closed
gavv opened this issue Apr 6, 2023 · 3 comments
Closed

Improve bodyWrapper Rewind test #377

gavv opened this issue Apr 6, 2023 · 3 comments
Assignees
Labels
good first issue Good for newcomers help wanted Contributions are welcome tests Improvements or additions to tests
Milestone

Comments

@gavv
Copy link
Owner

gavv commented Apr 6, 2023

bodyWrapper is an internal struct that wraps HTTP response body and allows to read it multiple times using Rewind and GetBody methods. See comments for details.

Currently TestBodyWrapper_Rewind has two subtests:

  • "readall - close - rewind - readall"
  • "rewind - readall - close - rewind - readall"

Subtest name describes the order of performed operations.

It would be nice to cover a few more combinations of operations:

  • "readall - rewind - readall" (no close before rewind)
  • "close - rewind - readall" (no readall before rewind)
  • "rewind - readall - rewind - readall" (no close after rewind)
  • "rewind - close - rewind - readall" (no readall after rewind)
  • "loop" ("readall - close - rewind" repeated a few times)
@gavv gavv added tests Improvements or additions to tests help wanted Contributions are welcome good first issue Good for newcomers labels Apr 6, 2023
@gavv gavv changed the title Improve bodyWrapper rewind test Improve bodyWrapper.Rewind test Apr 6, 2023
@gavv gavv changed the title Improve bodyWrapper.Rewind test Improve bodyWrapper Rewind test Apr 6, 2023
@AnandaIlyasa
Copy link
Contributor

hi @gavv i'd like to work on this

@gavv
Copy link
Owner Author

gavv commented Apr 26, 2023

@AnandaIlyasa Welcome, thanks!

@gavv
Copy link
Owner Author

gavv commented Oct 1, 2023

Merged via 8d90e3b, thanks!

@gavv gavv closed this as completed Oct 1, 2023
@gavv gavv added this to the v2 milestone Oct 5, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers help wanted Contributions are welcome tests Improvements or additions to tests
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants