Add ConfigMap content assertions to vMCP telemetry integration tests#4807
Add ConfigMap content assertions to vMCP telemetry integration tests#4807ChrisJBurns merged 1 commit intomainfrom
Conversation
Verify the vmcp-config ConfigMap contains the correct telemetry settings from the referenced MCPTelemetryConfig: endpoint (with https:// prefix stripped), tracing/metrics enabled flags, and that the ConfigMap updates when the MCPTelemetryConfig endpoint changes. This ensures the full data path is tested end-to-end: CRD spec → converter → ConfigMap → telemetry config, not just status conditions. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4807 +/- ##
==========================================
- Coverage 69.01% 68.98% -0.03%
==========================================
Files 517 518 +1
Lines 54829 54980 +151
==========================================
+ Hits 37838 37930 +92
- Misses 14074 14122 +48
- Partials 2917 2928 +11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
LGTM — test-only addition following existing patterns.
Extended reasoning...
Overview
Single-file change to an integration test for the VirtualMCPServer telemetry feature. Adds two new assertion blocks that parse the generated ConfigMap's config.yaml and verify telemetry fields (endpoint, tracing enabled, metrics enabled) match the referenced MCPTelemetryConfig, including after an endpoint update.
Security risks
None. This is a test file with no production code changes. It reads Kubernetes objects from the test cluster and performs assertions only.
Level of scrutiny
Low. The change is purely additive to an existing test file, uses the same Eventually/k8sClient.Get patterns already present throughout the file, and correctly accounts for the NormalizeTelemetryConfig behavior (stripping https:// prefix) in its expected values.
Other factors
No bugs were found. All 10 integration suites reportedly pass. The new assertions close a real coverage gap (converter output was previously untested), making this a net improvement with no risk.
Summary
Follow-up to #4801 (VirtualMCPServer TelemetryConfigRef). The integration tests in #4801 verified status conditions and hash tracking but did not assert the actual ConfigMap content produced by the converter. This gap means a bug in the converter's telemetry normalization path could pass all tests while producing incorrect telemetry config in the deployed ConfigMap.
{name}-vmcp-configConfigMap'sconfig.yamlcontains the correct telemetry endpoint, tracing enabled, and metrics enabled from the referenced MCPTelemetryConfigCloses #4792
Type of change
Test plan
task lint-fix)task operator-test-integration) — all 10 suites passGenerated with Claude Code