test(mcp-integrations): add Kubernetes MCP actions integration coverage - #4549
Open
HusneShabbir wants to merge 4 commits into
Open
Conversation
Add plugin and MCP protocol integration tests for kubernetes-mcp-extras, aligned with Orchestrator and Scorecard MCP patterns from PR redhat-developer#4426. Signed-off-by: HusneShabbir <husneshabbir447@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
HusneShabbir
requested review from
a team,
gabemontero,
johnmcollier and
thepetk
as code owners
September 2, 2026 17:46
Changed Packages
|
Fixes tsc:full CI failure in kubernetes-mcp-extras plugin integration test. Signed-off-by: HusneShabbir <husneshabbir447@gmail.com> Co-authored-by: Cursor <cursoragent@cursor.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4549 +/- ##
=======================================
Coverage 62.26% 62.26%
=======================================
Files 2606 2606
Lines 104644 104648 +4
Branches 29428 29428
=======================================
+ Hits 65155 65160 +5
+ Misses 38927 38926 -1
Partials 562 562
*This pull request uses carry forward flags. Click here to find out more. Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
jrichter1
reviewed
Sep 3, 2026
Load only kubernetes-mcp-extras and mcpPlugin in the integration test backend, matching the Orchestrator pattern instead of all MCP extras plugins. Co-authored-by: Cursor <cursoragent@cursor.com>
Drop redundant tools/list test and READ_ONLY_TOOL_NAMES alias; the read-only metadata test already asserts both tools are exposed. Co-authored-by: Cursor <cursoragent@cursor.com>
|
jrichter1
approved these changes
Sep 3, 2026
HusneShabbir
enabled auto-merge (squash)
September 3, 2026 08:29
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.



Description
This PR was planned using the automation-coverage MCP against the
mcp-integrationsworkspace (workspaces/mcp-integrations). That MCP analyzed thekubernetes-mcp-extrasplugin inventory, compared gaps against Orchestrator and Scorecard MCP integration patterns, and recommended L2startTestBackend/ MCP protocol coverage for the actions introduced in #4426.No published plugin
src/changed, so there is no changeset. HTTP/RBAC/service-error scenarios for the action handlers remain covered by the existing unit tests; this PR adds MCP wiring and protocol-level integration coverage.The dedicated Kubernetes integration harness loads only
kubernetes-mcp-extrasandmcpPlugin(matching the Orchestrator pattern), not every MCP extras plugin in the workspace.Resolves: https://redhat.atlassian.net/browse/RHIDP-15229
Tests added by layer
Cheapest layer that can catch the failure wins. The same assertion is not duplicated downstream.
L1 — Unit (existing, unchanged)
plugins/kubernetes-mcp-extras/src/actions/createGetKubernetesClustersAction.test.tsplugins/kubernetes-mcp-extras/src/actions/createGetKubernetesResourcesForEntityAction.test.tsL2 — Integration (
startTestBackend+ MCP client)plugins/kubernetes-mcp-extras/src/plugin.integration.test.tsget-kubernetes-clustersandget-kubernetes-resources-for-entitypackages/backend/src/kubernetes-mcp-tools.integration.test.tstools/listread-only MCP annotations (presence + metadata);pluginSourcesfiltering; input validation errors for missing/invalidnamepackages/backend/src/mcp-tools.integration.test.tsNot in this PR: overlay smoke/e2e, cluster-free e2e, cluster e2e, or full
tools/callhappy-path tests against mocked kubernetes-backend HTTP (actions use dynamicnode-fetchimports that Jest cannot intercept reliably in this backend harness).Test plan
yarn workspace @red-hat-developer-hub/backstage-plugin-kubernetes-mcp-extras testyarn workspace backend test:integrationinworkspaces/mcp-integrations/packages/backendChecklist