WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
test: improve HTTP test robustness and resource management
- Use NewRequestWithContext with a background context in tests instead of NewRequest
- Add error handling and fail tests immediately if RoundTrip returns an error
- Ensure HTTP response bodies are closed after each test to prevent resource leaks
Signed-off-by: appleboy <[email protected]>
0 commit comments