feat: opt-in Docker-based Gitea integration test suite (#66)
Adds tests/integration/: an optional real-Gitea suite, skipped by default, enabled only by GITEA_INTEGRATION=1. - docker-compose.yml pins gitea/gitea:1.22.6 (disposable container, port 3003) - gitea-integration helper: up (wait-ready) / token (test-only admin, token to stdout only) / down (removes container + volume) - conftest.py: session fixtures; unique disposable seed repo (inttest-<hex>) created via API and deleted on teardown - test_gitea_live.py (6 tests, via shared api_request/api_get_all client): issue pagination multi-page walk + overall limit, PR listing, targeted label add/remove leaves other labels intact, bad-token 401 fails closed without echoing the credential, real 404 payload surfaces as safe redacted error - README + developer-testing-guidelines section 8 updated (planned -> real) Default pytest tests/ -q: 355 passed, 6 skipped (unit suite unchanged, no network). Live verification: 6 passed against the pinned container. No production credentials; token never logged. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
# Disposable Gitea for the opt-in integration suite (#66).
|
||||
# Pinned image for reproducibility — bump deliberately, never use :latest.
|
||||
# Usage: tests/integration/gitea-integration up|token|down
|
||||
services:
|
||||
gitea:
|
||||
image: gitea/gitea:1.22.6
|
||||
container_name: gitea-tools-integration
|
||||
environment:
|
||||
- GITEA__security__INSTALL_LOCK=true
|
||||
- GITEA__server__ROOT_URL=http://localhost:3003/
|
||||
- GITEA__server__HTTP_PORT=3000
|
||||
- GITEA__service__DISABLE_REGISTRATION=true
|
||||
- GITEA__log__LEVEL=Warn
|
||||
ports:
|
||||
- "3003:3000"
|
||||
volumes:
|
||||
- gitea-integration-data:/data
|
||||
volumes:
|
||||
gitea-integration-data:
|
||||
Reference in New Issue
Block a user