Closed GregoryAlbouy closed 1 year ago
Merging #62 (6c67087) into main (5a25fcb) will decrease coverage by
0.15%
. The diff coverage is71.73%
.:exclamation: Current head 6c67087 differs from pull request most recent head 243547c. Consider uploading reports for the commit 243547c to get more accurate results
:mega: This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more
@@ Coverage Diff @@
## main #62 +/- ##
==========================================
- Coverage 74.40% 74.26% -0.15%
==========================================
Files 25 26 +1
Lines 801 847 +46
==========================================
+ Hits 596 629 +33
- Misses 181 191 +10
- Partials 24 27 +3
Flag | Coverage Δ | |
---|---|---|
unittests | 74.26% <71.73%> (-0.15%) |
:arrow_down: |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
benchttptest/compare.go | 71.73% <71.73%> (ø) |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
Description
Package
benchttptest
provides utilities for benchttp testing.It exposes comparison utilities to be used by benchttp consumers in their tests:
configparse
/configio
,benchttp/cli.configflag
, and any source that needs to ensure it creates or retrieves an expectedbenchttp.Runner
.Currently exposed functions:
It uses
go-cmp
internally, which allows to fine-tune equality checks contrary toreflect.DeepEqual
. However it has some severe rules regarding immutability and I haven't managed to tweak it aroundRequest.Body
, as it cannot be read without mutation. As a work-around we simply compare the body separately (and restore it afterwards).Changes
No changes to the existing in this PR. However it makes tests much simpler in the following PRs:
Notes