Skip to content

Fix #1413: Replace dead test URLs with local httptest server#1440

Open
rodionsteshenko wants to merge 1 commit into
iawia002:masterfrom
rodionsteshenko:fix-issue-1413
Open

Fix #1413: Replace dead test URLs with local httptest server#1440
rodionsteshenko wants to merge 1 commit into
iawia002:masterfrom
rodionsteshenko:fix-issue-1413

Conversation

@rodionsteshenko
Copy link
Copy Markdown

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).

…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant