Skip to content

chore(tests): remove plugin integration tests migrated to cpex-plugins#4308

Open
gandhipratik203 wants to merge 2 commits intomainfrom
chore/remove-migrated-plugin-integration-tests
Open

chore(tests): remove plugin integration tests migrated to cpex-plugins#4308
gandhipratik203 wants to merge 2 commits intomainfrom
chore/remove-migrated-plugin-integration-tests

Conversation

@gandhipratik203
Copy link
Copy Markdown
Collaborator

@gandhipratik203 gandhipratik203 commented Apr 19, 2026

🔗 Related Issue

Companion to IBM/cpex-plugins#35 (see cpex-plugins#34 under parent cpex-plugins#20).

📝 Summary

The rate_limiter and encoded_exfil_detection plugins now live in IBM/cpex-plugins, and their integration tests have been ported there alongside the plugin code. This PR removes the now-duplicate copies from mcp-context-forge and 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

  • Chore (test cleanup + migration follow-up)

Deleted

  • tests/integration/test_rate_limiter.py — ported to cpex-plugins/plugins/rust/python-package/rate_limiter/tests/integration/.
  • tests/integration/test_encoded_exfil.py — ported to cpex-plugins/plugins/rust/python-package/encoded_exfil_detection/tests/integration/.
  • tests/loadtest/locustfile_rate_limiter.py — dead duplicate of locustfile_rate_limiter_backend_correctness.py. Same docstring, same scenario, superseded implementation. The Makefile's MCP_RATE_LIMITER_LOCUSTFILE already points at the _backend_correctness file; nothing else in the repo references the deleted copy.

Not removed — executor-mode coverage stays here

Tests for executor-side dispatch (PERMISSIVE / ENFORCE / DISABLED mode handling) live in this repo and are untouched by this PR:

  • tests/unit/mcpgateway/plugins/framework/test_manager_coverage.pyTestPermissiveBlocking
  • tests/unit/mcpgateway/plugins/framework/test_manager_extended.pytest_manager_plugin_permissive_blocking

They exercise the real PluginExecutor with inline trivial plugins and continue to catch executor regressions regardless of plugin package location.

📓 Notes

The TestRateLimiterAuthBoundary cases (FastAPI TestClient, 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.

@gandhipratik203 gandhipratik203 self-assigned this Apr 19, 2026
@gandhipratik203 gandhipratik203 added this to the Release 1.0.0 milestone Apr 19, 2026
@gandhipratik203 gandhipratik203 added chore Linting, formatting, dependency hygiene, or project maintenance chores testing Testing (unit, e2e, manual, automated, etc) plugins triage Issues / Features awaiting triage labels Apr 19, 2026
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>
@gandhipratik203 gandhipratik203 force-pushed the chore/remove-migrated-plugin-integration-tests branch from 814d781 to 1c6da21 Compare April 19, 2026 13:56
@gandhipratik203 gandhipratik203 marked this pull request as ready for review April 19, 2026 13:56
@gandhipratik203 gandhipratik203 removed the triage Issues / Features awaiting triage label Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Linting, formatting, dependency hygiene, or project maintenance chores plugins testing Testing (unit, e2e, manual, automated, etc)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant