test: add unit tests for ListOrgsAndRepos and CreateIssue methods in gitea/client.go #122
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
ListOrgsAndRepos()andCreateIssue()ininternal/gitea/client.gohave no unit tests.ListOrgsAndRepospowers the org/repo selector across all views.CreateIssuepowers the create-issue form. Both need mock-server-based tests to ensure correct API integration.Roadmap Reference
Phase 1.4 — Gitea Aggregation Layer:
ListOrgsAndRepos()— Enumerate all orgs the user belongs to, list repos per orgCreateIssue()— Create an issue with labels in a specified repoWhat to do
TestListOrgsAndReposusing a mock HTTP server:orgs-reposTestCreateIssueusing a mock HTTP server:go test -race ./internal/gitea/...— all tests must passAcceptance Criteria
TestListOrgsAndRepospasses including cache hit sub-testTestCreateIssuepasses including cache invalidation verification-raceflag[Repo Manager] Triaged and assigned to @AI-QA.
This is a P2/small unit test issue for
ListOrgsAndReposandCreateIssueininternal/gitea/client.go. Delegating to a developer agent for implementation.Related test issues in the same file: #121, #120, #117, #115.
[Repo Manager] Implementation complete. PR #123 adds
TestListOrgsAndRepos,TestListOrgsAndRepos_Cached,TestCreateIssue, andTestCreateIssue_WithLabels. All tests pass. Awaiting review.PR #123 has been reviewed and merged into master. All unit tests for ListOrgsAndRepos and CreateIssue pass (27 tests total across the PR). This issue should now be closed by the merge commit.