From 916070e16d6caa4d738b22b82606e85d681ef196 Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Sun, 29 Nov 2026 00:24:16 +0000 Subject: [PATCH] test(passthrough): rename the client reset reader helper Two packages each declared failingReader in the same test package. The passthrough gate test now uses clientResetReader. --- passthrough_unpriced_gate_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/passthrough_unpriced_gate_test.go b/passthrough_unpriced_gate_test.go index f10f0dd..a7423a7 100644 --- a/passthrough_unpriced_gate_test.go +++ b/passthrough_unpriced_gate_test.go @@ -284,13 +284,13 @@ func TestPassthroughCostGate_UnparseableObjectRefused(t *testing.T) { } } -type failingReader struct{} +type clientResetReader struct{} -func (failingReader) Read([]byte) (int, error) { return 0, errors.New("client reset") } +func (clientResetReader) Read([]byte) (int, error) { return 0, errors.New("client reset") } func TestPassthroughCostGate_WidenedReadErrorIs400(t *testing.T) { e := newGateEnv(t, nil) - body := io.MultiReader(strings.NewReader(`{"pad":"`+strings.Repeat("a", maxModelPeekBytes+1024)), failingReader{}) + body := io.MultiReader(strings.NewReader(`{"pad":"`+strings.Repeat("a", maxModelPeekBytes+1024)), clientResetReader{}) req := httptest.NewRequest(http.MethodPost, "/openai/v1/native-endpoint", body) req.ContentLength = -1 req.Header.Set("Authorization", "Bearer sk-alice")