Skip to content

Add ConfigMap content assertions to vMCP telemetry integration tests#4807

Merged
ChrisJBurns merged 1 commit intomainfrom
vmcp-telemetry-followup
Apr 14, 2026
Merged

Add ConfigMap content assertions to vMCP telemetry integration tests#4807
ChrisJBurns merged 1 commit intomainfrom
vmcp-telemetry-followup

Conversation

@ChrisJBurns
Copy link
Copy Markdown
Collaborator

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.

  • Add assertion verifying the {name}-vmcp-config ConfigMap's config.yaml contains the correct telemetry endpoint, tracing enabled, and metrics enabled from the referenced MCPTelemetryConfig
  • Add assertion verifying the ConfigMap updates when the MCPTelemetryConfig endpoint changes (endpoint reflected in the ConfigMap data)
  • Tests the full data path: CRD spec → converter → ConfigMap → telemetry config

Closes #4792

Type of change

  • New feature

Test plan

  • Linting (task lint-fix)
  • Integration tests (task operator-test-integration) — all 10 suites pass

Generated with Claude Code

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>
@github-actions github-actions bot added the size/XS Extra small PR: < 100 lines changed label Apr 14, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 14, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 68.98%. Comparing base (3688694) to head (5406b4f).
⚠️ Report is 6 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown
Contributor

@claude claude bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ChrisJBurns ChrisJBurns merged commit be40131 into main Apr 14, 2026
43 checks passed
@ChrisJBurns ChrisJBurns deleted the vmcp-telemetry-followup branch April 14, 2026 14:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/XS Extra small PR: < 100 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

VirtualMCPServer to use MCPTelemetryConfig

2 participants