Skip to content

refactor(metrics): export struct fields and use _test package#471

Closed
danroc wants to merge 1 commit intomainfrom
refactor/metrics-test-package
Closed

refactor(metrics): export struct fields and use _test package#471
danroc wants to merge 1 commit intomainfrom
refactor/metrics-test-package

Conversation

@danroc
Copy link
Owner

@danroc danroc commented Feb 26, 2026

Summary

  • Export PrometheusCollector struct fields to enable black-box testing with the package metrics_test convention
  • Fix stale doc comment on PrometheusCollector
  • Move assertCounterValue helper to top of test file with other helpers
  • Add TestNewCollector_VersionInfo test

Follow-up to #470.

@danroc danroc force-pushed the refactor/metrics-test-package branch 2 times, most recently from cc70912 to d69d32b Compare February 26, 2026 23:41
Make PrometheusCollector fields public to enable black-box testing
with the `package metrics_test` convention. Add version info test.
@danroc danroc force-pushed the refactor/metrics-test-package branch from d69d32b to ab4c3a6 Compare February 26, 2026 23:42
@danroc danroc closed this Feb 26, 2026
@codecov
Copy link

codecov bot commented Feb 27, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 91.00%. Comparing base (743d6e4) to head (ab4c3a6).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #471   +/-   ##
=======================================
  Coverage   91.00%   91.00%           
=======================================
  Files          12       12           
  Lines         756      756           
=======================================
  Hits          688      688           
  Misses         62       62           
  Partials        6        6           

☔ View full report in Codecov by Sentry.
📢 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.

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