Test the image route's signature check and error answers (closes #76)
check / check (push) Failing after 2s

New tests in internal/handlers, with no network: the status and JSON
error body the image route answers for a missing, wrong, unpadded,
upper-case or expired signature on a host not on the allowlist, an
unparseable path, localhost as the upstream host, and an upstream
error; that an allowlisted host is served without a signature and
another host only with a valid one; and the answers of /robots.txt and
the health check. An expired signature is answered 401, as the code
does, where the issue body expected 410. No code changes.

Model: opus-5-5
This commit is contained in:
2026-10-04 07:43:57 +00:00
parent 1616e91a6a
commit 390f8bdd87
3 changed files with 337 additions and 0 deletions
+8
View File
@@ -29,6 +29,14 @@ P2: security: referer blacklist
# Completed Steps
- 2026-10-04 the image route's signature check and error answers are tested
(closes #76): new tests in `internal/handlers`, with no network, check the
status and JSON error body for a missing, wrong, unpadded, upper-case or
expired signature on a host not on the allowlist (401), an unparseable path
(400), `localhost` as the upstream host (403) and an upstream error (502);
that an allowlisted host is served without a signature, another host only
with a valid one; and the answers of `/robots.txt` and the health check. No
code changes.
- 2026-10-04 shutdown stops cache eviction in progress (closes #102):
`StartEviction` runs the eviction goroutine with its own context, which
`StopEviction` cancels, so a pass in progress stops at its next database