test: unit tests for ListOrgsAndRepos, CreateIssue, ListAllIssues, ListAllPullRequests #123
Reference in New Issue
Block a user
Delete Branch "feature/unit-tests-122-121"
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
TestListOrgsAndReposandTestListOrgsAndRepos_Cachedcovering map result, caching, and concurrent fan-outTestCreateIssue,TestCreateIssue_WithLabelscovering successful creation, label passthrough, RepoOwner/RepoName population, and cache invalidationTestListAllIssues_Sorting,TestListAllIssues_StateFilter,TestListAllIssues_DefaultState,TestListAllIssues_RepoFilter,TestListAllIssues_Paginationcovering sorting by UpdatedAt desc, state filter passthrough, default state, repo narrowing, and page offsetTestListAllPullRequests_Sorting,TestListAllPullRequests_StateFilter,TestListAllPullRequests_Paginationwith equivalent coverage for PRsAll tests use
httptest.Servermock servers with no external network calls.Closes #122
Closes #121
Test plan
go test -v ./internal/gitea/...-- all 27 tests passgo test -race ./internal/gitea/...-- requires gcc (not available in this container); should be validated in CI🤖 Generated with Claude Code