fix(gitea): fix 15 failing tests and update documentation #413

Merged
lmiranda merged 1 commits from fix/gitea-mcp-tests-docs into development 2026-02-03 19:23:42 +00:00
Owner

Summary

  • Fix 15 failing unit tests in gitea MCP server (64/64 now passing)
  • Update documentation to reflect all 36 tools (was showing only 8)
  • Create CHANGELOG.md with full version history

Test Fixes

The tests were out of sync with the current API:

  • Mock fixtures now use owner/repo format instead of separate fields
  • Added required org argument to aggregate methods
  • Updated error message assertions to match current code
  • Fixed label resolution mocking in create_issue test

Documentation Updates

  • Tools table: Expanded from 8 to 36 tools, organized by category
  • Directory structure: Shows all 6 tool files (was 2)
  • Configuration: Removed unused GITEA_OWNER, added auto-detection docs
  • Test count: Updated from 42 to 64
  • CHANGELOG.md: New file with v1.0.0 through v1.3.0 history

Test Results

pytest tests/ -v
============================== 64 passed ==============================

Files Changed

File Change
README.md +136 lines (tools, config, structure)
TESTING.md Updated test counts
CHANGELOG.md NEW - version history
tests/test_config.py Remove unused assertion
tests/test_gitea_client.py Fix fixtures and assertions
tests/test_issues.py Add org argument

Test Plan

  • All 64 tests pass
  • Server starts (python -m mcp_server.server)
  • Pre-commit validation passes
  • Review documentation accuracy

🤖 Generated with Claude Code

## Summary - Fix 15 failing unit tests in gitea MCP server (64/64 now passing) - Update documentation to reflect all 36 tools (was showing only 8) - Create CHANGELOG.md with full version history ## Test Fixes The tests were out of sync with the current API: - Mock fixtures now use `owner/repo` format instead of separate fields - Added required `org` argument to aggregate methods - Updated error message assertions to match current code - Fixed label resolution mocking in create_issue test ## Documentation Updates - **Tools table**: Expanded from 8 to 36 tools, organized by category - **Directory structure**: Shows all 6 tool files (was 2) - **Configuration**: Removed unused `GITEA_OWNER`, added auto-detection docs - **Test count**: Updated from 42 to 64 - **CHANGELOG.md**: New file with v1.0.0 through v1.3.0 history ## Test Results ``` pytest tests/ -v ============================== 64 passed ============================== ``` ## Files Changed | File | Change | |------|--------| | README.md | +136 lines (tools, config, structure) | | TESTING.md | Updated test counts | | CHANGELOG.md | NEW - version history | | tests/test_config.py | Remove unused assertion | | tests/test_gitea_client.py | Fix fixtures and assertions | | tests/test_issues.py | Add org argument | ## Test Plan - [x] All 64 tests pass - [x] Server starts (`python -m mcp_server.server`) - [x] Pre-commit validation passes - [ ] Review documentation accuracy --- 🤖 Generated with [Claude Code](https://claude.ai/code)
lmiranda added 1 commit 2026-02-03 19:23:09 +00:00
Test Fixes:
- Fix mock_config fixture to use 'owner/repo' format (was separate fields)
- Update test_client_initialization to match current client API
- Add required 'org' argument to get_org_labels, list_repos, aggregate_issues tests
- Update error message assertion in test_no_repo_specified_error
- Fix test_create_issue to mock is_org_repo and label resolution
- Update aggregate_issues tests in test_issues.py with org argument

Documentation Updates:
- Expand tools table from 8 to 36 tools (organized by category)
- Update directory structure to show all 6 tool files
- Remove unused GITEA_OWNER from configuration docs
- Add automatic repository detection documentation
- Add project directory detection strategies
- Update test count from 42 to 64
- Create CHANGELOG.md with full version history

All 64 tests now pass. No production code changes.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
lmiranda merged commit b0e6d738fa into development 2026-02-03 19:23:42 +00:00
lmiranda deleted branch fix/gitea-mcp-tests-docs 2026-02-03 19:23:42 +00:00
Sign in to join this conversation.
No Reviewers
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: personal-projects/leo-claude-mktplace#413