Skip to content

test(mcp): tighten Cloud MCP request-shape coverage with strict mock assertions #923

@joshrotenberg

Description

@joshrotenberg

Summary

Cloud MCP coverage still needs a stricter request-contract layer, especially while real Cloud integration testing remains limited by the lack of a dedicated test account.

The main goal is to prove that Cloud MCP tools send the correct HTTP method, path, query parameters, and request body for the current API surface.

Why

Without reliable real-account testing, the highest-confidence thing we can validate is request shape.

Loose mocks are not enough to catch bugs like:

  • request bodies silently dropped
  • missing query parameters
  • wrong path composition
  • method mismatches that still deserialize correctly in permissive tests

Proposed scope

Prioritize the Cloud MCP modules with the largest surface and highest request complexity:

  • subscriptions
  • networking
  • fixed
  • account

Proposed work

  • Strengthen wiremock matchers so tests assert exact method/path/query/body shape
  • Add coverage for bodyful DELETE and other edge-case request forms
  • Add targeted regression tests for tools that wrap async or multi-parameter endpoints
  • Bias toward breadth first so each dense module has at least some strict request-contract coverage

Acceptance criteria

  • Cloud MCP tests assert request shape, not just response parsing
  • High-risk modules have strict matcher coverage for representative read/write endpoints
  • Known fragile request patterns have dedicated regression tests

Context

Related to #628, #680, and #681.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions