Fix #1413: Replace dead test URLs with local httptest server#1440
Open
rodionsteshenko wants to merge 1 commit into
Open
Fix #1413: Replace dead test URLs with local httptest server#1440rodionsteshenko wants to merge 1 commit into
rodionsteshenko wants to merge 1 commit into
Conversation
…h httptest server The downloader tests relied on external URLs (bcyimg.com, snssdk.com, miaopai.com) that are no longer available, causing consistent test failures with 404 errors. This replaces all external URL dependencies with a local httptest server that serves minimal fake content, making tests reliable and network-independent. Also adds: - Subtests via t.Run for better test output - Temp directory for downloads with automatic cleanup - Silent mode to suppress progress bar noise in tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The downloader test suite was broken because all test URLs (bcyimg.com, snssdk.com, miaopai.com) return 404. Replaced them with a local httptest.NewServer, making tests reliable, fast (~0.3s), and network-independent. All 3 test cases pass on macOS ARM (Apple Silicon).