Skip to content

test: add coverage for MCP tools list and upload tool execute dispatch#462

Merged
jamesadevine merged 3 commits intomainfrom
copilot/add-test-gaps-for-upload-build-artifact
May 8, 2026
Merged

test: add coverage for MCP tools list and upload tool execute dispatch#462
jamesadevine merged 3 commits intomainfrom
copilot/add-test-gaps-for-upload-build-artifact

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

Closes test gaps from the gap-finder report: the MCP tools/list integration test asserted only 5 of ~20 registered tools (missing both upload tools), and the execute-dispatch arms for upload-workitem-attachment and upload-build-attachment had zero direct coverage.

Summary

  • tests/mcp_http_tests.rs — extend test_mcp_initialize_and_tools_list with asserts for upload-workitem-attachment and upload-build-attachment so a broken MCP registration on either tool fails the suite.
  • src/execute.rs — add 4 unit tests mirroring the existing update-wiki-page / comment-on-work-item patterns to exercise the dispatch arms:
    • test_execute_malformed_upload_workitem_attachment_returns_err
    • test_execute_upload_workitem_attachment_missing_context
    • test_execute_malformed_upload_build_attachment_returns_err
    • test_execute_upload_build_attachment_missing_context
  • Resolved a merge conflict with main in tests/mcp_http_tests.rs where main added an upload-pipeline-artifact assertion in the same block; kept all three upload assertions (upload-workitem-attachment, upload-build-attachment, upload-pipeline-artifact).

Note: the issue refers to upload-build-artifact, but the actually-registered tool name is upload-build-attachment (see src/mcp.rs:994, src/execute.rs:352). Tests use the real name.

Test plan

  • cargo test --bin ado-aw execute::tests::test_execute_malformed_upload → 2 passed
  • cargo test --bin ado-aw execute::tests::test_execute_upload → 2 passed (missing_context)
  • cargo test --test mcp_http_tests test_mcp_initialize_and_tools_list → passed (after merge with main)
  • cargo test --bin ado-aw execute::tests::test_execute_ → all 24 execute tests passed after merge

Copilot AI changed the title [WIP] Add test gaps for new MCP tools in gap analysis test: add coverage for MCP tools list and upload tool execute dispatch May 8, 2026
Copilot AI requested a review from jamesadevine May 8, 2026 12:13
@jamesadevine jamesadevine marked this pull request as ready for review May 8, 2026 14:28
@jamesadevine
Copy link
Copy Markdown
Collaborator

@copilot resolve the merge conflicts in this pull request

Co-authored-by: jamesadevine <4742697+jamesadevine@users.noreply.github.com>
Copy link
Copy Markdown
Contributor Author

Copilot AI commented May 8, 2026

@copilot resolve the merge conflicts in this pull request

Resolved in fb39d59. The conflict was in tests/mcp_http_tests.rs where main added an upload-pipeline-artifact assertion in the same block; kept all three (upload-workitem-attachment, upload-build-attachment, upload-pipeline-artifact). Tests pass.

@jamesadevine jamesadevine merged commit 4a33c44 into main May 8, 2026
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.

🧪 Test gap analysis — 3 new gaps found in MCP tools list and execute dispatch

2 participants