chore(tests): remove plugin integration tests migrated to cpex-plugins#4308
Open
gandhipratik203 wants to merge 2 commits intomainfrom
Open
chore(tests): remove plugin integration tests migrated to cpex-plugins#4308gandhipratik203 wants to merge 2 commits intomainfrom
gandhipratik203 wants to merge 2 commits intomainfrom
Conversation
The rate_limiter and encoded_exfil_detection plugins now live in the IBM/cpex-plugins repo, and their integration tests have been ported there alongside the plugin code (branch: feat/port-mcp-gateway-integration-tests). Removing the copies here avoids duplicate coverage and keeps the tests co-located with the implementation that actually changes between releases. Deleted: - tests/integration/test_rate_limiter.py - tests/integration/test_encoded_exfil.py The FastAPI TestClient auth-boundary cases from the rate_limiter suite (unauthenticated requests to /api/v1/prompts/ and /api/v1/tools/invoke returning 401) were not ported — they test gateway HTTP behaviour rather than plugin behaviour, and general auth coverage is provided elsewhere in this repo's test suite. Unit tests for these plugins are being migrated separately and remain untouched by this change. Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
tests/loadtest/locustfile_rate_limiter.py is a dead duplicate of tests/loadtest/locustfile_rate_limiter_backend_correctness.py — same docstring, same scenario (single user at 2x the default limit against three nginx-balanced gateway instances), but the _backend_correctness variant is the improved implementation: it classifies responses in-place instead of firing a second failure-marker request, handles HTTP 502 / 503 / 504 as infra errors, and records rate-limited responses as success() so they do not inflate infra failure counts. The Makefile's MCP_RATE_LIMITER_LOCUSTFILE already points at locustfile_rate_limiter_backend_correctness.py. Nothing else in the repo references the duplicate file. Signed-off-by: Pratik Gandhi <gandhipratik203@gmail.com>
814d781 to
1c6da21
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🔗 Related Issue
Companion to IBM/cpex-plugins#35 (see cpex-plugins#34 under parent cpex-plugins#20).
📝 Summary
The
rate_limiterandencoded_exfil_detectionplugins now live inIBM/cpex-plugins, and their integration tests have been ported there alongside the plugin code. This PR removes the now-duplicate copies frommcp-context-forgeand drops one dead-duplicate Locust file that had been superseded by a newer variant.Merge order. The companion PR cpex-plugins#35 lands first, then this PR — so there is never a window where integration coverage for these plugins is missing from both repos.
🏷️ Type of Change
Deleted
tests/integration/test_rate_limiter.py— ported tocpex-plugins/plugins/rust/python-package/rate_limiter/tests/integration/.tests/integration/test_encoded_exfil.py— ported tocpex-plugins/plugins/rust/python-package/encoded_exfil_detection/tests/integration/.tests/loadtest/locustfile_rate_limiter.py— dead duplicate oflocustfile_rate_limiter_backend_correctness.py. Same docstring, same scenario, superseded implementation. TheMakefile'sMCP_RATE_LIMITER_LOCUSTFILEalready points at the_backend_correctnessfile; nothing else in the repo references the deleted copy.Not removed — executor-mode coverage stays here
Tests for executor-side dispatch (
PERMISSIVE/ENFORCE/DISABLEDmode handling) live in this repo and are untouched by this PR:tests/unit/mcpgateway/plugins/framework/test_manager_coverage.py—TestPermissiveBlockingtests/unit/mcpgateway/plugins/framework/test_manager_extended.py—test_manager_plugin_permissive_blockingThey exercise the real
PluginExecutorwith inline trivial plugins and continue to catch executor regressions regardless of plugin package location.📓 Notes
The
TestRateLimiterAuthBoundarycases (FastAPITestClient, 401 on unauthenticated/api/v1/prompts/and/api/v1/tools/invoke) were not ported to cpex-plugins — they test gateway HTTP/auth behaviour, not plugin behaviour, and general auth coverage is provided elsewhere in this repo's test suite.Plugin unit-test migration for these two plugins is being handled under a separate effort and is out of scope here.