• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

nbari / pg_exporter / 18629635093
90%
main: 90%

Build:
Build:
LAST BUILD BRANCH: develop
DEFAULT BRANCH: main
Ran 19 Oct 2025 11:21AM UTC
Jobs 1
Files 51
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

19 Oct 2025 11:16AM UTC coverage: 87.055% (+0.09%) from 86.962%
18629635093

push

github

nbari
refactor: improve CLI test maintainability with RAII guards

Added helper functions to reduce boilerplate and improve safety:

1. ChildGuard: RAII guard ensures automatic process cleanup on scope exit,
   preventing resource leaks even if tests panic or return early.

2. start_and_wait(): Combines start + wait logic, reducing repetition
   across 5 async tests. Returns Result for better error propagation.

3. http_get(): Centralizes HTTP request logic, eliminating duplicate
   client creation and error handling across endpoint tests.

Benefits:
- Reduced code by 12 lines (83 deleted, 71 added)
- Eliminated manual cleanup_child() calls in most tests
- Automatic cleanup even on early returns or panics
- Better error messages (uses anyhow::bail with context)
- More readable tests focusing on behavior, not boilerplate
- Consistent HTTP handling across all endpoint tests

All tests still pass in 3.70s locally.

45 of 48 new or added lines in 1 file covered. (93.75%)

3941 of 4527 relevant lines covered (87.06%)

32.85 hits per line

Uncovered Changes

Lines Coverage ∆ File
3
92.86
1.48% tests/cli_integration.rs
Jobs
ID Job ID Ran Files Coverage
1 18629635093.1 19 Oct 2025 11:21AM UTC 51
87.06
GitHub Action Run
Source Files on build 18629635093
  • Tree
  • List 51
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18629635093
  • ed471104 on github
  • Prev Build on develop (#18629461544)
  • Next Build on develop (#18630051145)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc