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

stacklok / toolhive / 18564002743
59%

Build:
DEFAULT BRANCH: main
Ran 16 Oct 2025 02:09PM UTC
Jobs 1
Files 291
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

16 Oct 2025 02:04PM UTC coverage: 46.716% (-0.05%) from 46.766%
18564002743

push

github

web-flow
Extract common controller helpers from MCPRemoteProxy PR (#2230)

* Extract common controller helpers and refactor MCPServer to use SharedPlatformDetector

This extracts common helper functions from the large MCPRemoteProxy PR
(#2226) into a shared common_helpers.go file that can be used by multiple
controllers.

Changes:
- Add common_helpers.go with shared helper functions:
  - SharedPlatformDetector for platform detection across controllers
  - RBAC resource creation helpers (EnsureRBACResource, createRBACResource)
  - OpenTelemetry environment variable generation
  - Token exchange environment variable generation
  - Authorization volume configuration (GenerateAuthzVolumeConfig)
  - Authorization ConfigMap management (EnsureAuthzConfigMap)
  - Authorization config options for RunConfig (AddAuthzConfigOptions)
  - GetExternalAuthConfigByName for fetching external auth configs

- Refactor MCPServerReconciler to use SharedPlatformDetector:
  - Replace individual platformDetector, detectedPlatform, and platformOnce
    fields with single PlatformDetector field
  - Update detectPlatform() to use shared detector
  - Initialize SharedPlatformDetector in main.go
  - Update deploymentForMCPServer to use local detectedPlatform variable

- Add test helpers and fixtures:
  - newTestMCPServerReconciler() for test setup
  - newTestMCPServerReconcilerWithDetector() for custom detector injection
  - NewSharedPlatformDetectorWithDetector() for testing with mock detectors
  - Update all test files to use new helper functions
  - Fix imports in all test files to include kubernetes package

This is the first step in adopting the common helpers from PR #2226.
Additional refactoring will follow to adopt the remaining helper functions.

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

* Refactor MCPServer controller to use common helper functions

This completes the adoption of common helper functions from PR #2226,
removing duplication between the MCPServ... (continued)

233 of 329 new or added lines in 4 files covered. (70.82%)

23 existing lines in 2 files now uncovered.

17912 of 38342 relevant lines covered (46.72%)

15.71 hits per line

New Missed Lines in Diff

Lines Coverage ∆ File
6
0.0
0.0% cmd/thv-operator/main.go
8
55.05
-3.42% cmd/thv-operator/controllers/mcpserver_controller.go
82
73.2
cmd/thv-operator/controllers/common_helpers.go

Uncovered Existing Lines

Lines Coverage ∆ File
2
51.2
-1.2% pkg/client/config.go
21
48.94
-22.34% pkg/secrets/keyring/keyctl_linux.go
Jobs
ID Job ID Ran Files Coverage
1 18564002743.1 16 Oct 2025 02:09PM UTC 291
46.72
GitHub Action Run
Source Files on build 18564002743
  • Tree
  • List 291
  • Changed 6
  • Source Changed 3
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #18564002743
  • 30672949 on github
  • Prev Build on main (#18561445936)
  • Next Build on main (#18567315040)
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