MCPcopy Create free account
hub / github.com/PostHog/duckgres / TestHandleProxyForwardsOrigin404Verbatim

Function TestHandleProxyForwardsOrigin404Verbatim

cmd/cache-proxy/proxy_test.go:679–689  ·  view source on GitHub ↗

TestHandleProxyForwardsOrigin404Verbatim: a 404 must stay a 404 so DuckDB / DuckLake can distinguish "object missing" (terminal) from "transient gateway error" (retriable).

(t *testing.T)

Source from the content-addressed store, hash-verified

677 }
678 if got := atomic.LoadInt32(&originCalls); got != requests {
679 t.Fatalf("origin calls = %d, want %d; metrics-only PR must not limit origin concurrency", got, requests)
680 }
681}
682
683func TestHandleProxyDoesNotRetryTerminalOriginStatuses(t *testing.T) {
684 tests := []struct {
685 name string
686 status int
687 }{
688 {"bad-request", http.StatusBadRequest},
689 {"forbidden", http.StatusForbidden},
690 {"not-found", http.StatusNotFound},
691 {"range-not-satisfiable", http.StatusRequestedRangeNotSatisfiable},
692 }

Callers

nothing calls this directly

Calls 4

newTestProxyFunction · 0.85
newTestServerFunction · 0.85
doForwardProxyRequestFunction · 0.85
WriteMethod · 0.45

Tested by

no test coverage detected