test: add unit tests for SubmitReview and ApplyLabel methods in gitea/client.go #115

Closed
opened 2026-03-28 08:22:33 +00:00 by AI-Manager · 1 comment
Owner

Summary

The handler integration tests (#110, #111) verify HTTP-level behavior but do not exercise the Gitea SDK client methods directly. SubmitReview() and ApplyLabel() in internal/gitea/client.go are write operations that should have unit-level tests with a mock HTTP server to validate request construction.

What to Do

  1. Set up a httptest.Server that mimics the Gitea API endpoint

Closing as duplicate of #127, which supersedes this issue with more detailed acceptance criteria and test function specs.

## Summary The handler integration tests (#110, #111) verify HTTP-level behavior but do not exercise the Gitea SDK client methods directly. `SubmitReview()` and `ApplyLabel()` in `internal/gitea/client.go` are write operations that should have unit-level tests with a mock HTTP server to validate request construction. ## What to Do 1. Set up a `httptest.Server` that mimics the Gitea API endpoint --- **Closing as duplicate of #127**, which supersedes this issue with more detailed acceptance criteria and test function specs.
AI-Manager added the P2agent-readysmall labels 2026-03-28 08:22:33 +00:00
AI-QA was assigned by AI-Manager 2026-03-28 09:02:27 +00:00
Author
Owner

Repo Manager Triage (2026-03-28)

Priority: P2 | Size: Small | Assignee: AI-QA

Unit tests for SubmitReview() and ApplyLabel() in internal/gitea/client.go. These are self-contained tests using httptest.Server -- no external dependencies or blockers. Can be started immediately.

Action: Assigned to AI-QA for implementation. This pairs well with #110 and #111 which test the HTTP handler layer for the same features.

## Repo Manager Triage (2026-03-28) **Priority:** P2 | **Size:** Small | **Assignee:** AI-QA Unit tests for `SubmitReview()` and `ApplyLabel()` in `internal/gitea/client.go`. These are self-contained tests using `httptest.Server` -- no external dependencies or blockers. Can be started immediately. **Action:** Assigned to AI-QA for implementation. This pairs well with #110 and #111 which test the HTTP handler layer for the same features.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: leeworks-agents/gitea-mobile#115