Files
codeberg-to-gitea-migrator/tests/AGENTS.md
T
AlexKucera ab43b0311e feat: implement Codeberg → Gitea repo migrator
Replay git (mirror + LFS), labels, milestones, issues & PRs (with
comments), and releases (with assets) entity-by-entity over the shared
Forgejo/Gitea REST API. Two-pass issue/PR creation rewrites #NNN and
URL cross-references to the target number space; deleted-branch PR
heads are recreated as refs/heads/_pr/<n>.

CLI: codeberg-to-gitea migrate owner/name  (CODEBERG_TOKEN/GITEA_TOKEN)
Verified end-to-end on AlexKucera/helm: 283 issues, 1 PR, 19 labels,
219 comments, git history, with cross-refs correctly rewritten.
2026-08-11 11:12:06 +02:00

30 lines
747 B
Markdown

# tests
## Purpose
Pytest suite for `codeberg_to_gitea_migrator`.
## Ownership
Project maintainer (Alexander Kucera).
## Local Contracts
- pytest `testpaths = ["tests"]` (root `pyproject.toml`).
- Test files named `test_*.py`; test functions `test_*`.
## Work Guidance
- `test_smoke.py` — package imports + version.
- `test_refs.py` — `#NNN`/URL cross-reference rewrite + `NumberMap`.
- `test_clients.py` — `ApiClient` pagination, param cleaning, 4xx handling, JSON POST, all via `httpx.MockTransport` (no network).
- Keep tests network-free: never hit live Codeberg/Gitea from the suite. The end-to-end run is a manual CLI invocation, not a test.
## Verification
- `pytest` from the repo root.
## Child DOX Index
- No children.