feat: opt-in Docker-based Gitea integration test suite (#66) (#97)

Co-authored-by: Jason Walker <913443@dadeschools.net>
Co-committed-by: Jason Walker <913443@dadeschools.net>
This commit was merged in pull request #97.
This commit is contained in:
2026-07-02 15:31:56 -05:00
committed by sysadmin
parent 02c0c2023b
commit 3eff8d1cb3
7 changed files with 327 additions and 8 deletions
+9 -8
View File
@@ -208,17 +208,18 @@ git diff --cached | grep -nEi "authorization: (basic|bearer)|password|token=[A-Z
---
## 8. Unit tests vs. future Docker integration tests
## 8. Unit tests vs. Docker integration tests
* **Unit tests (today, default):** fast, fully mocked, no network, no keychain.
* **Unit tests (default):** fast, fully mocked, no network, no keychain.
This is where the vast majority of coverage lives and where new tests should
go. They must stay fast and must not require credentials.
* **Docker/local-Gitea integration tests (planned, see #66):** opt-in and
skipped by default, gated behind an explicit environment variable and run
against a pinned, disposable Gitea container. They validate real API behavior
(pagination, permissions, label/PR-review endpoints, error payloads) that
mocks cannot prove. They must not require production credentials and must not
leak tokens.
* **Docker/local-Gitea integration tests (#66, `tests/integration/`):** opt-in
and skipped by default — enabled only by `GITEA_INTEGRATION=1` and run
against a pinned, disposable Gitea container
(`tests/integration/gitea-integration up|token|down`). They validate real
API behavior (pagination, permissions, label endpoints, error payloads) that
mocks cannot prove. They must not use production credentials and must not
leak tokens. See [`../tests/integration/README.md`](../tests/integration/README.md).
Rule of thumb: prove **logic and request-shaping** with unit tests; reserve
integration tests for **real-server compatibility**. Do not convert unit tests