Add containerized integration test suite #2

Merged
delandtj merged 5 commits from development into main 2026-02-10 14:40:38 +00:00
Member

Summary

  • Add 14 integration tests covering all Forgejo API client methods (repos, issues, labels, milestones, orgs, teams, projects, branches, comments, pull requests, reviews, users, admin, cross-repo finder)
  • Docker Compose setup with pre-built forgejo-test:local image and healthcheck-based readiness
  • Test harness with shared client (token cached via OnceCell), idempotent setup helpers, and .env.test config
  • CI workflow (.forgejo/workflows/integration.yaml) for automated runs
  • Fix UpdateProjectStatusOption to use state: String matching Forgejo API (was is_closed: Option<bool>)
  • Fix team creation to include required units field
  • Add create_file client method for file content API

Test plan

  • make test-integ passes all 14 tests from clean state (container down, volumes removed)
  • Tests are idempotent — pass on repeated runs without container reset
  • cargo check --all-targets compiles cleanly
## Summary - Add 14 integration tests covering all Forgejo API client methods (repos, issues, labels, milestones, orgs, teams, projects, branches, comments, pull requests, reviews, users, admin, cross-repo finder) - Docker Compose setup with pre-built `forgejo-test:local` image and healthcheck-based readiness - Test harness with shared client (token cached via `OnceCell`), idempotent setup helpers, and `.env.test` config - CI workflow (`.forgejo/workflows/integration.yaml`) for automated runs - Fix `UpdateProjectStatusOption` to use `state: String` matching Forgejo API (was `is_closed: Option<bool>`) - Fix team creation to include required `units` field - Add `create_file` client method for file content API ## Test plan - [x] `make test-integ` passes all 14 tests from clean state (container down, volumes removed) - [x] Tests are idempotent — pass on repeated runs without container reset - [x] `cargo check --all-targets` compiles cleanly
Fix find_issues MCP tool: use correct Forgejo API endpoint
All checks were successful
Build and Test / build (pull_request) Successful in 2m7s
76b346fb4a
The find_issues tool was calling /api/v1/finder/issues which doesn't
exist, causing 404 for all requests. Changed to the correct endpoint
/api/v1/repos/issues/search with proper parameter mapping.

- Add RepositoryMeta type and repository field on Issue
- Add request_with_headers() to capture X-Total-Count header
- Rewrite find_issues() to use /repos/issues/search endpoint
- Map MCP assignee username to assigned=true + client-side filtering
- Rename milestone→milestones, add q search parameter
- Remove unused FinderIssueResult (replaced by Issue + RepositoryMeta)
- Update Rhai bindings to convert from Issue instead of FinderIssueResult
Implements ADR-003 (consolidating ADR-001 and ADR-002): a self-contained
Docker-based test infrastructure covering 14 API domains (users, orgs,
repos, labels, milestones, issues, teams, comments, projects, org-projects,
branches, pull requests, cross-repo finder, admin defaults).

Key additions:
- Docker Compose config for test Forgejo instance
- Test harness with idempotent setup helpers
- create_file client method for PR content testing
- Makefile targets: test-integ, test-integ-up/down/setup
- CI workflow for manual integration test runs
Fix integration test failures: project status API, team units, test idempotency
All checks were successful
Build and Test / build (push) Successful in 1m45s
Build and Test / build (pull_request) Successful in 2m11s
c16ccdd1fa
- UpdateProjectStatusOption: change `is_closed: Option<bool>` to `state: String`
  to match Forgejo API which expects {"state": "open"|"closed"}
- CreateTeamOption: add required `units` field in team test
- Make tests idempotent: clean up stale repos/users from prior runs
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lhumina_research/forgejo_clients!2
No description provided.