cmds/core/wget: remove testutil#2540
Conversation
Codecov ReportBase: 73.38% // Head: 73.43% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #2540 +/- ##
==========================================
+ Coverage 73.38% 73.43% +0.05%
==========================================
Files 411 411
Lines 41746 41751 +5
==========================================
+ Hits 30635 30661 +26
+ Misses 11111 11090 -21
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. |
rminnich
left a comment
There was a problem hiding this comment.
Just two questions, nice to see more tests!
7507450 to
56be810
Compare
56be810 to
5df6aed
Compare
496f483 to
ec09887
Compare
rminnich
left a comment
There was a problem hiding this comment.
I like this new design. You can see my one comment re New() vs new()
Let's see what abrender thinks but I believe we are almost done!
95b8156 to
49bd7cb
Compare
abrender
left a comment
There was a problem hiding this comment.
Thanks for continuing to work on this - it is appreciated!
49bd7cb to
8269aa6
Compare
|
looks like we can't guarantee EOF pervious test just check for non zero, but this seems flaky on CI. |
8269aa6 to
ae3400c
Compare
Can't made it work. It may return at least 3 different errors and one of the is even internal Or I can remove errors.Is and check for error code 1 or 0. |
Perhaps cmpopts.EquateErrors and AnyError can help here? |
This will work, but I would prefer to just separate this test case and do simple The problem with this that I don't fully understand what the purpose of this test case. We already covered error case for curl command with 4xx and 5xx test cases. What kind of http related error we got there it's not a wget command problem, it's maybe a problem of curl lib, but error comes from http client do function. |
Sure, a separate test for As for what it's testing - I'm not the original author, but I assume there's a reasonable assumption that error handling for HTTP status codes is different than error handling for errors unrelated to HTTP status codes (like network errors). |
add none nil error to HTTPClientCodeError if error code is not 200 to make errors.Is work Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
under -race wget can return three different errors and this made errors.Is problematic to use Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
ae3400c to
c139102
Compare
Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
Signed-off-by: Siarhiej Siemianczuk <pdp.eleven11@gmail.com>
|
Looks good to me! Thank you so much for your patience. I'll await @rminnich to resolve his open comment threads |
Thanks for feedback, appreciate it :) Learned a bit about current Fatal behaviour. |
|
Sorry @rminnich but I can't change labels, so pinging you via mention :) |
rminnich
left a comment
There was a problem hiding this comment.
This is a substantial improvement. Thanks for your patience.
Signed-off-by: Siarhiej Siemianczuk pdp.eleven11@gmail.com