test: add unit tests for ListAllIssues and ListAllPullRequests concurrent fan-out in gitea/client.go #121
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
ListAllIssues()andListAllPullRequests()are the core aggregation functions ininternal/gitea/client.go— they fan out across orgs/repos concurrently using errgroup, apply pagination, filtering by label and repo, and merge results sorted by updated time. Neither function has any unit tests.Roadmap Reference
Phase 1.4 — Gitea Aggregation Layer:
ListAllIssues(orgs []string)— Fan-out across repos with errgroup, merge + sort by updated timeListAllPullRequests(orgs []string)— Same pattern for PRs, includes review statusWhat to do
client_test.gothat responds to org/repo listing and issues/pulls endpointsTestListAllIssuescovering:statefilter passed through to APIlabelfilter applied correctlyrepoFilternarrows results to a single repoTestListAllPullRequestswith equivalent coveragego test -race ./internal/gitea/...— all tests must passAcceptance Criteria
TestListAllIssuestests pass with-raceflagTestListAllPullRequeststests pass with-raceflag[Repo Manager] Triaged and assigned to @AI-QA.
This is a P2/medium unit test issue for
ListAllIssuesandListAllPullRequestsconcurrent fan-out ininternal/gitea/client.go. Delegating to a developer agent for implementation.Related test issues in the same file: #122, #120, #117, #115.
[Repo Manager] Implementation complete. PR #123 adds
TestListAllIssues_Sorting,TestListAllIssues_StateFilter,TestListAllIssues_DefaultState,TestListAllIssues_RepoFilter,TestListAllIssues_Pagination,TestListAllPullRequests_Sorting,TestListAllPullRequests_StateFilter, andTestListAllPullRequests_Pagination. All tests pass. Awaiting review.PR #123 has been reviewed and merged into master. All unit tests for ListAllIssues and ListAllPullRequests concurrent fan-out pass (27 tests total across the PR). This issue should now be closed by the merge commit.