Add test coverage analysis with improvement recommendations#14
Merged
Conversation
Analyzes current test coverage across all packages, identifies 17 untested source files (~4,248 lines), and proposes prioritized improvements. Key gaps are in HTTP handlers (handlers.go - 1,147 lines), import engine, progress tracking, and HTTP safety utilities. https://claude.ai/code/session_01JE85vb8u8xcG3Dt3rfpvWu
New test files: - engine/progress_test.go: 15 tests covering thread-safe progress tracking, concurrent updates, snapshot isolation, wait signal, and event cap - engine/import_test.go: 6 tests for collectRPMRepoDirs covering dedup, mixed providers, path traversal rejection, and empty manifests - safety/http_test.go: 12 tests for ValidateHTTPURL, IsLoopbackHost, ReadAllWithLimit, and NewHTTPClient (table-driven) - jobsvc/service_test.go: 8 tests for job type/provider normalization, validation, and ExecuteJob error paths - server/handlers_test.go: 25 tests covering API sync, validate, scan, retry, cancel, failures, and provider detail handlers - server/transfer_handlers_test.go: 7 tests for transfer list, export, and import validation - server/templates_test.go: 5 tests for formatBytes, formatTime, formatDuration, and template func registration Fix: - mirror/speedtest_test.go: Replace unreachable RFC 5737 address with a hijacked connection that closes immediately, making the test deterministic instead of timing-dependent https://claude.ai/code/session_01JE85vb8u8xcG3Dt3rfpvWu
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.
Analyzes current test coverage across all packages, identifies 17 untested
source files (~4,248 lines), and proposes prioritized improvements. Key gaps
are in HTTP handlers (handlers.go - 1,147 lines), import engine, progress
tracking, and HTTP safety utilities.
https://claude.ai/code/session_01JE85vb8u8xcG3Dt3rfpvWu