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")