Skip to content

test(mcp): add per-tool integration coverage#1383

Open
corylanou wants to merge 4 commits into
issue-1368-refactor-mcp-migrate-to-the-official-modelcontextprotocol-gofrom
issue-1373-test-mcp-add-an-mcp-server-test-suite
Open

test(mcp): add per-tool integration coverage#1383
corylanou wants to merge 4 commits into
issue-1368-refactor-mcp-migrate-to-the-official-modelcontextprotocol-gofrom
issue-1373-test-mcp-add-an-mcp-server-test-suite

Conversation

@corylanou

@corylanou corylanou commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds focused integration coverage for the seven MCP tools on top of the official Go SDK migration in #1378.

  • Connects the official SDK client and server with in-memory transports.
  • Exercises success and error paths for every registered tool.
  • Uses a temporary SQLite database synced to a real file:// replica.
  • Verifies restore and reset through their filesystem and database side effects.

Investigation

The mcp_test.go added by #1378 already comprehensively covers server identity, capabilities, tool discovery, generated schemas, annotations, structured output, argument preservation, cancellation, panic recovery, and Streamable HTTP transport.

The remaining thin areas were per-tool failures, the SDK's in-process transport, and behavior against real Litestream data. This PR fills those gaps without importing changes from the other MCP branches.

Scope

In scope:

  • Per-tool success and error coverage.
  • Official SDK in-memory client/server transport.
  • Temporary SQLite and file:// replica fixture.
  • Restore-content and reset-removal assertions.

Not in scope:

  • Replacing subprocess-backed MCP handlers.
  • Adding MCP tools or changing tool schemas.
  • Changes from sibling MCP branches.

Test Plan

go test -race -run '^TestMCPToolIntegration$' -v ./cmd/litestream/
go test -race ./cmd/litestream/
go vet ./...
pre-commit run --all-files
go test -race ./...

Related

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

PR Build Metrics

All clear — no issues detected

Check Status Summary
Binary size 38.29 MB (0.0 KB / 0.00%)
Dependencies No changes
Vulnerabilities None detected
Go toolchain 1.25.12 (latest)
Module graph 1248 edges (0)

Binary Size

Size Change
Base (eb6c415) 38.29 MB
PR (4f23a3a) 38.29 MB 0.0 KB (0.00%)

Dependency Changes

No dependency changes.

govulncheck Output

=== Symbol Results ===

No vulnerabilities found.

Your code is affected by 0 vulnerabilities.
This scan also found 0 vulnerabilities in packages you import and 1
vulnerability in modules you require, but your code doesn't appear to call these
vulnerabilities.
Use '-show verbose' for more details.

Build Info

Metric Value
Build time 51s
Go version go1.25.12
Commit 4f23a3a

History (2 previous)

Commit Updated Status Summary
cfd4f3c 2026-07-18 21:42 UTC 38.27 MB (0.0 KB / 0.00%)
687f18f 2026-07-17 18:36 UTC 38.27 MB (0.0 KB / 0.00%)

🤖 Updated on each push.

@corylanou
corylanou marked this pull request as ready for review July 17, 2026 18:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant