Skip to content

Add test coverage analysis with improvement recommendations#14

Merged
BadgerOps merged 2 commits into
masterfrom
claude/analyze-test-coverage-Kpn0h
Mar 13, 2026
Merged

Add test coverage analysis with improvement recommendations#14
BadgerOps merged 2 commits into
masterfrom
claude/analyze-test-coverage-Kpn0h

Conversation

@BadgerOps

Copy link
Copy Markdown
Owner

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

claude added 2 commits March 13, 2026 00:06
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
@BadgerOps BadgerOps merged commit 04b811d into master Mar 13, 2026
3 checks passed
@BadgerOps BadgerOps deleted the claude/analyze-test-coverage-Kpn0h branch March 13, 2026 03:44
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.

2 participants