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

test: add new test cases for pkg/protocol/response.go #374

Merged
merged 6 commits into from
Nov 24, 2022

Conversation

gityh2021
Copy link
Contributor

@gityh2021 gityh2021 commented Nov 14, 2022

What type of PR is this?

test

Check the PR title.

  • This PR title match the format: <type>(optional scope): <description>
  • The description of this PR title is user-oriented and clear enough for others to understand.

(Optional) Translate the PR title into Chinese.

测试:为pkg/protocol/response.go文件新增测试用例。

(Optional) More detail description for this PR(en: English/zh: Chinese).

en: add test cases for the following features for pkg/protocol/response.go and the test coverage rate of pkg/protocol/response.go is improved to 81.08%.
1.TestResponseMustSkipBody:test when to skip body read and copy.
2.TestResponseBodyGunzip: test compress and decompress body with gzip.
3.TestResponseSwapResponseBody.
4.TestResponseAcquireResponse: test acquire and release response.
zh(optional):

Which issue(s) this PR fixes:

#257

@CLAassistant
Copy link

CLAassistant commented Nov 14, 2022

CLA assistant check
All committers have signed the CLA.

… pkg/protocol/response.go increased to 85.6%.
@L2ncE
Copy link
Member

L2ncE commented Nov 15, 2022

You can improve your description according to the PR template and can describe the situation of unit test coverage.

@codecov
Copy link

codecov bot commented Nov 15, 2022

Codecov Report

Base: 67.53% // Head: 67.87% // Increases project coverage by +0.34% 🎉

Coverage data is based on head (37734f1) compared to base (d601515).
Patch has no changes to coverable lines.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop     #374      +/-   ##
===========================================
+ Coverage    67.53%   67.87%   +0.34%     
===========================================
  Files           89       89              
  Lines         8608     8608              
===========================================
+ Hits          5813     5843      +30     
+ Misses        2435     2404      -31     
- Partials       360      361       +1     
Impacted Files Coverage Δ
pkg/common/compress/compress.go 80.95% <0.00%> (-2.86%) ⬇️
pkg/protocol/header.go 74.25% <0.00%> (+0.26%) ⬆️
pkg/protocol/response.go 81.08% <0.00%> (+20.94%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@gityh2021 gityh2021 changed the title add new test cases for pkg/protocol/response.go test: add new test cases for pkg/protocol/response.go Nov 15, 2022
@welkeyever
Copy link
Member

Please resign the CLA🙏

@gityh2021
Copy link
Contributor Author

gityh2021 commented Nov 22, 2022

done

Please resign the CLA🙏

@welkeyever
Copy link
Member

It is best to note the change in overall coverage in the description.

@gityh2021 gityh2021 closed this Nov 22, 2022
@gityh2021 gityh2021 reopened this Nov 22, 2022
@gityh2021
Copy link
Contributor Author

It is best to note the change in overall coverage in the description.

done, sorry to close this pr...

resolve blank line.
@welkeyever welkeyever merged commit d89206f into cloudwego:develop Nov 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants