Skip to content

test: add gitea branch/PR/release primitives for hotfix scenarios#113

Merged
joshua-temple merged 2 commits into
mainfrom
test/e2e-gitea-hotfix-primitives
Jun 11, 2026
Merged

test: add gitea branch/PR/release primitives for hotfix scenarios#113
joshua-temple merged 2 commits into
mainfrom
test/e2e-gitea-hotfix-primitives

Conversation

@joshua-temple

Copy link
Copy Markdown
Collaborator

Add branch, pull request, and release primitives to GiteaContainer for use in hotfix e2e scenarios.

New methods:

  • CreateBranch, GetBranchSHA, DeleteBranch, ListBranches
  • CreateCommitOnBranch (generalizes CreateCommit; backward-compatible wrapper kept)
  • GetFileContentOnBranch (GetFileContent now delegates to it with branch=main)
  • CreatePR, MergePR, ListOpenPRs
  • CreateRelease, GetReleases (returns []GiteaRelease)

Notes:

  • MergePR polls the pull request mergeable field before merging, since Gitea computes mergeability asynchronously and returns 405 if merged too early.
  • ListBranches assertions use require.Eventually because Gitea's branch listing endpoint is eventually consistent.

Verification: go build ./..., go vet ./..., golangci-lint run ./harness/..., and go test -run TestGiteaHotfixPrimitives ./harness/ all pass (6/6 subtests).

Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
Signed-off-by: Joshua Temple <joshua.temple@stablekernel.com>
@joshua-temple joshua-temple merged commit 5863aba into main Jun 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant