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

stacklok / toolhive / 19311403055
51%

Build:
DEFAULT BRANCH: main
Ran 12 Nov 2025 08:52PM UTC
Jobs 1
Files 380
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

12 Nov 2025 08:46PM UTC coverage: 48.921% (-0.001%) from 48.922%
19311403055

push

github

web-flow
Fix flaky TestGenerateUserAgent test using dependency injection (#2561)

The test was flaky due to race conditions from parallel subtests manipulating
the shared global environment variable KUBERNETES_SERVICE_HOST. This caused
intermittent failures when tests executed concurrently.

This fix refactors generateUserAgent() to use dependency injection with the
existing env.Reader interface, allowing tests to use isolated mock environment
readers instead of modifying global state. The tests now run reliably in
parallel without interference.

Changes:
- Add generateUserAgentWithEnv() that accepts an env.Reader parameter
- Keep generateUserAgent() as a wrapper using env.OSReader for production
- Update tests to use gomock-based environment readers
- Remove all os.Setenv/Unsetenv calls from tests
- Tests remain parallel and pass consistently with race detector

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude <noreply@anthropic.com>

4 of 4 new or added lines in 1 file covered. (100.0%)

2 existing lines in 1 file now uncovered.

24163 of 49392 relevant lines covered (48.92%)

35.71 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
82.83
-0.55% pkg/transport/proxy/httpsse/http_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 19311403055.1 12 Nov 2025 08:52PM UTC 380
48.92
GitHub Action Run
Source Files on build 19311403055
  • Tree
  • List 380
  • Changed 2
  • Source Changed 1
  • Coverage Changed 2
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #19311403055
  • 2978ac65 on github
  • Prev Build on main (#19309784474)
  • Next Build on main (#19312047856)
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

© 2025 Coveralls, Inc