feat: opt-in Docker-based Gitea integration test suite (#66) #97
Reference in New Issue
Block a user
Delete Branch "feat/issue-66-docker-gitea-integration"
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?
Implements #66. Optional real-Gitea integration suite — skipped by default, unit tests untouched.
Summary
GITEA_INTEGRATION=1(documented); without it the suite skips with zero network/Docker requirements.gitea/gitea:1.22.6viatests/integration/docker-compose.yml(host port 3003, named volume).tests/integration/gitea-integration up|token|down— wait-until-ready startup, idempotent TEST-ONLY admin + token printed once to stdout (never written to disk), full teardown including volume.inttest-<8 hex>), created and deleted via API; nothing outside it touched.api_request/api_get_allclient per #65/#67 shape): issue listing + multi-page pagination walk; overalllimithonored across pages; PR listing (real PR created via contents API); targeted label add/remove leaves other labels intact; bad-token 401 fails closed without echoing the credential; real 404 error payload surfaces as a safe redactedRuntimeError.Files changed
tests/integration/__init__.py,conftest.py,test_gitea_live.py(new)tests/integration/docker-compose.yml,gitea-integration,README.md(new)docs/developer-testing-guidelines.md(section 8: planned → implemented, +link)Validation
python3 -m py_compileconftest + test module — OK (no other Python changed)bash -n tests/integration/gitea-integration— OKpytest tests/ -q— 355 passed, 6 skipped (unit behavior byte-identical; integration skips with no network)GITEA_INTEGRATION=1 pytest tests/integration/ -q— 6 passed (0.81s); container + volume torn down aftergit diff --check— cleanRisks / follow-up
single-branch PR test assumesmainas the container's default branch (true for pinned image defaults).Confirmations
Closes #66.
LLM Handoff Metadata:
🤖 Generated with Claude Code