[test] consolidate console tests into a single file#28
Conversation
console.go mapped to two test files (console_test.go + console_internal_test.go) — one source file should have one test file. Merge them into a single console_test.go as an internal (white-box) test, so both the public capture API and the unexported consoleCore (With/Sync) are covered in one place. console.go coverage stays 100%; every source file now maps to exactly one test file.
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| Duplication | -2 |
🟢 Coverage ∅ diff coverage · +0.00% coverage variation
Metric Results Coverage variation ✅ +0.00% coverage variation (-1.00%) Diff coverage ✅ ∅ diff coverage Coverage variation details
Coverable lines Covered lines Coverage Common ancestor commit (6a0e7ed) 1154 1145 99.22% Head commit (b17fb62) 1154 (+0) 1145 (+0) 99.22% (+0.00%) Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch:
<coverage of head commit> - <coverage of common ancestor commit>Diff coverage details
Coverable lines Covered lines Diff coverage Pull request (#28) 0 0 ∅ (not applicable) Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified:
<covered lines added or modified>/<coverable lines added or modified> * 100%
NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #28 +/- ##
=======================================
Coverage 98.95% 98.95%
=======================================
Files 12 12
Lines 862 862
=======================================
Hits 853 853
Misses 5 5
Partials 4 4 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Per review feedback: a source file should map to one test file.
console.gohad two (console_test.go+console_internal_test.go).Merge them into a single
console_test.goas an internal (white-box) test (package starbox), so both the public capture API (EnableConsoleCapture/Console/Drain) and the unexportedconsoleCore(With/Sync, which the log module never drives) are covered in one place.console.gostays at 100% coverage; every source file now maps to exactly one test file.No source change. (
coverage.txtseen locally is a gitignoredmake ciartifact — not tracked in the repo, nothing to remove.)