Skip to content

Add integration tests for MCPRemoteProxy resource references#3608

Open
ChrisJBurns wants to merge 2 commits intomainfrom
mcp-remote-proxy-int-tests
Open

Add integration tests for MCPRemoteProxy resource references#3608
ChrisJBurns wants to merge 2 commits intomainfrom
mcp-remote-proxy-int-tests

Conversation

@ChrisJBurns
Copy link
Collaborator

@ChrisJBurns ChrisJBurns commented Feb 4, 2026

Summary

  • Add integration tests for MCPRemoteProxy controller's integration with other resources (ExternalAuthConfigRef, ToolConfigRef, GroupRef)
  • Add helper methods to reduce test duplication (WaitForPhase)
  • Add builder methods for setting resource references (WithExternalAuthConfigRef, WithToolConfigRef, WithGroupRef)

Test Coverage Added

ExternalAuthConfigRef Integration (3 tests)

  • Fails validation when referenced MCPExternalAuthConfig does not exist
  • Successfully reconciles when referenced MCPExternalAuthConfig exists
  • Triggers reconciliation when MCPExternalAuthConfig is updated (hash tracking)

ToolConfigRef Integration (3 tests)

  • Fails validation when referenced MCPToolConfig does not exist
  • Successfully reconciles when referenced MCPToolConfig exists
  • Propagates tool config changes to the RunConfig ConfigMap (hash tracking)

GroupRef Integration (5 tests)

  • Sets GroupRefValidated condition to False when MCPGroup does not exist
  • Sets GroupRefValidated condition to True when MCPGroup exists and is Ready
  • Sets GroupRefValidated condition to False when MCPGroup is not Ready
  • Does not have GroupRefValidated condition when no GroupRef is specified
  • Updates GroupRefValidated condition when MCPGroup becomes Ready

Test plan

  • Tests compile successfully
  • Code passes go vet and gofmt
  • Tests pass in CI with envtest

Related Issues

Closes #3362 (Integration with Other Resources section)

See also #3607 for a follow-up to add structured status conditions for ToolConfigRef and ExternalAuthConfigRef validation.

🤖 Generated with Claude Code

Signed-off-by: Chris Burns <29541485+ChrisJBurns@users.noreply.github.com>
@github-actions github-actions bot added the size/L Large PR: 600-999 lines changed label Feb 4, 2026
- Add WaitForPhase helper to reduce test duplication
- Add WaitForStatusMessage helper for status message assertions
- Update ExternalAuthConfigRef and ToolConfigRef tests to use helpers
- Improve "not found" assertions to verify both config name and
  "not found" substring for stronger validation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ChrisJBurns ChrisJBurns force-pushed the mcp-remote-proxy-int-tests branch from 1f6e931 to fa890fc Compare February 4, 2026 21:45
@github-actions github-actions bot added size/L Large PR: 600-999 lines changed and removed size/L Large PR: 600-999 lines changed labels Feb 4, 2026
@codecov
Copy link

codecov bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 65.60%. Comparing base (f16d0cc) to head (fa890fc).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3608      +/-   ##
==========================================
- Coverage   65.61%   65.60%   -0.01%     
==========================================
  Files         407      407              
  Lines       40246    40246              
==========================================
- Hits        26407    26404       -3     
- Misses      11779    11781       +2     
- Partials     2060     2061       +1     

☔ 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/L Large PR: 600-999 lines changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Integration tests: MCPRemoteProxy Controller

1 participant