feat(test): smoke test — verify all 66 tools are registered #16

Closed
opened 2026-06-08 05:38:07 +00:00 by a-limasov · 0 comments
Owner

Goal

A fast, zero-network test that guards against accidental tool deletions or regressions in MCP tool registration.

Implementation

File: tests/smoke/test_registration.py

from server.gitea_mcp import mcp

EXPECTED_TOOL_COUNT = 66

def test_all_tools_registered():
    tools = mcp.list_tools()
    assert len(tools) == EXPECTED_TOOL_COUNT, (
        f"Expected {EXPECTED_TOOL_COUNT} tools, found {len(tools)}. "
        "Update EXPECTED_TOOL_COUNT in this test and the count in README.md."
    )

def test_tool_names_unique():
    tools = mcp.list_tools()
    names = [t.name for t in tools]
    assert len(names) == len(set(names)), "Duplicate tool names detected"

Acceptance criteria

  • Test passes with current 66 tools
  • Adding a tool without updating the constant causes a clear failure message
  • Runs in < 1 s (no I/O)
## Goal A fast, zero-network test that guards against accidental tool deletions or regressions in MCP tool registration. ## Implementation File: `tests/smoke/test_registration.py` ```python from server.gitea_mcp import mcp EXPECTED_TOOL_COUNT = 66 def test_all_tools_registered(): tools = mcp.list_tools() assert len(tools) == EXPECTED_TOOL_COUNT, ( f"Expected {EXPECTED_TOOL_COUNT} tools, found {len(tools)}. " "Update EXPECTED_TOOL_COUNT in this test and the count in README.md." ) def test_tool_names_unique(): tools = mcp.list_tools() names = [t.name for t in tools] assert len(names) == len(set(names)), "Duplicate tool names detected" ``` ## Acceptance criteria - Test passes with current 66 tools - Adding a tool without updating the constant causes a clear failure message - Runs in < 1 s (no I/O)
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: a-limasov/gitea-platform-mcp#16