Skip to content

[test] consolidate console tests into a single file#28

Merged
vt128 merged 1 commit into
masterfrom
chore/tidy-console-tests-coverage
Jun 20, 2026
Merged

[test] consolidate console tests into a single file#28
vt128 merged 1 commit into
masterfrom
chore/tidy-console-tests-coverage

Conversation

@vt128

@vt128 vt128 commented Jun 20, 2026

Copy link
Copy Markdown
Member

Per review feedback: a source file should map to one test file. console.go had two (console_test.go + console_internal_test.go).

Merge them into a single console_test.go as an internal (white-box) test (package starbox), so both the public capture API (EnableConsoleCapture/Console/Drain) and the unexported consoleCore (With/Sync, which the log module never drives) are covered in one place. console.go stays at 100% coverage; every source file now maps to exactly one test file.

No source change. (coverage.txt seen locally is a gitignored make ci artifact — not tracked in the repo, nothing to remove.)

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.
@codacy-production

codacy-production Bot commented Jun 20, 2026

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 5 complexity · -2 duplication

Metric Results
Complexity 5
Duplication -2

View in Codacy

🟢 Coverage ∅ diff coverage · +0.00% coverage variation

Metric Results
Coverage variation +0.00% coverage variation (-1.00%)
Diff coverage diff coverage

View coverage diff in Codacy

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

codecov Bot commented Jun 20, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.95%. Comparing base (6a0e7ed) to head (b17fb62).

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@vt128 vt128 merged commit fd18a0f into master Jun 20, 2026
11 checks passed
@vt128 vt128 deleted the chore/tidy-console-tests-coverage branch June 20, 2026 08:54
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