1 Commits
Author SHA1 Message Date
clawbot 06975f95a9 Test that a URL made on the generator page with a ttl expires (closes #199)
check / check (push) Failing after 3s
A new handler test makes a URL on the generator page with a ttl of one
second, checks that /v1/e/ serves it at once, waits two seconds and
checks that it then answers 410. The expiry is kept in whole seconds,
so two seconds is the longest a one-second ttl can take to pass. Test
only.

Model: opus-5-5
2026-10-04 19:59:48 +00:00
@@ -283,7 +283,7 @@ func TestGeneratePost_URLWithTTLExpires(t *testing.T) {
imageSrv.ServeHTTP(imageRec, httptest.NewRequestWithContext(
t.Context(), http.MethodGet, match[1], nil))
t.Logf("GET %s after the ttl: %d %s", match[1], imageRec.Code, imageRec.Body)
t.Logf("GET %s after the ttl: %d %q", match[1], imageRec.Code, imageRec.Body)
if imageRec.Code != http.StatusGone {
t.Errorf("status after the ttl = %d, want %d",