chproxy
chproxy copied to clipboard
improve proxy unit tests
Description
This PR fix and improve unit test on proxy.go
Pull request type
Please check the type of change your PR introduces:
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, renaming)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] Documentation content changes
- [ ] Other (please describe):
Checklist
- [x] Linter passes correctly
- [ ] Add tests which fail without the change (if possible)
- [x] All tests passing
- [ ] Extended the README / documentation, if necessary
Does this introduce a breaking change?
- [ ] Yes
- [x] No
Further comments
Your Render PR Server URL is https://chproxy-pr-203.onrender.com.
Follow its progress at https://dashboard.render.com/static/srv-cbqf7h02i3mj3e1k40bg.
FYI I've run the ci on github actions a dozen of times and it failed only once on a unit test that is not linked to my modification (TestServe/http_cached_gzipped_deadline). The most instable test so far (TestReverseProxy_ServeHTTP1/queue_overflow_for_user) seems stable
For future improvement to avoid this kind of complicated issues we should have a fake server handler scoped to each test case. Tests will be a bit longer, but I doubt it will be very impactful