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

stacklok / toolhive / 23639897839
65%

Build:
DEFAULT BRANCH: main
Ran 27 Mar 2026 09:36AM UTC
Jobs 1
Files 584
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

27 Mar 2026 09:31AM UTC coverage: 65.401% (+0.04%) from 65.359%
23639897839

push

github

web-flow
Add tests for horizontal scaling operator behaviors (#4388)

* Inject Redis session storage config into vMCP ConfigMap

Add SessionStorageConfig to pkg/vmcp/config.Config and populate it in
the VirtualMCPServer converter when spec.sessionStorage.provider is
"redis". This allows vMCP pods to discover Redis connection parameters
(address, db, keyPrefix) at startup via the existing config injection
path. The Redis password is excluded from the config type and is
injected separately as the THV_SESSION_REDIS_PASSWORD environment
variable by the deployment builder.

Closes: #4214

* Add tests for horizontal scaling operator behaviors

Unit tests (controllers package):
- TestConfigMapContent_SessionStorage: verifies that ensureVmcpConfigConfigMap
  produces a ConfigMap YAML with the sessionStorage section populated when
  provider=redis, and absent when nil or memory.
- TestDeploymentForVirtualMCPServer_WithRedisPassword: verifies that
  deploymentForVirtualMCPServer injects THV_SESSION_REDIS_PASSWORD as a
  SecretKeyRef env var and never as a plaintext value.

Integration tests (envtest with real CRDs + controller loop):
- MCPServer: ScalingConfig (backend_replicas + session_redis) is written to
  the RunConfig ConfigMap when backendReplicas and Redis sessionStorage are
  set; omitted when absent.
- VirtualMCPServer: spec.replicas is reflected in Deployment.Spec.Replicas;
  nil replicas produces a nil Deployment replicas field for HPA compatibility.

E2E tests (Kind cluster via thv-operator-e2e-test-run):
- VirtualMCPServer created with replicas=2 runs 2 ready pods and sets
  SessionStorageWarning condition when no Redis is configured.
- Scale lifecycle (1→2→1): verifies Deployment replicas update in-place,
  2 pods come up, SessionStorageWarning fires on scale-up and clears on
  scale-down.

Closes: #4220

Fix ignored AddToScheme errors in unit tests

Replace `_ = *.AddToScheme(scheme)` with `require.NoError(t, *.AddToScheme(scheme))`
in virtualmcpserver_d... (continued)

52429 of 80166 relevant lines covered (65.4%)

63.29 hits per line

Uncovered Existing Lines

Lines Coverage ∆ File
2
73.2
1.31% pkg/runner/config.go
3
24.36
1.19% cmd/thv/app/server.go
3
71.85
-1.11% pkg/ignore/processor.go
9
77.84
-2.32% pkg/transport/proxy/httpsse/http_proxy.go
Jobs
ID Job ID Ran Files Coverage
1 23639897839.1 27 Mar 2026 09:36AM UTC 584
65.4
GitHub Action Run
Source Files on build 23639897839
  • Tree
  • List 584
  • Changed 9
  • Source Changed 1
  • Coverage Changed 9
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Github Actions Build #23639897839
  • a7711174 on github
  • Prev Build on main (#23637344250)
  • Next Build on main (#23643160643)
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