(t *testing.T)
| 491 | } |
| 492 | |
| 493 | func TestInfer_InvalidInput400(t *testing.T) { |
| 494 | srv := New(testConfig(100, true)) |
| 495 | ts := httptest.NewServer(srv.Routes()) |
| 496 | defer ts.Close() |
| 497 | |
| 498 | status, body := postInfer(t, ts.URL, map[string]any{ |
| 499 | "tenant_id": "team-a", |
| 500 | "task_type": "simple", |
| 501 | "options": map[string]any{ |
| 502 | "stream": false, |
| 503 | "max_tokens": 128, |
| 504 | }, |
| 505 | }) |
| 506 | |
| 507 | if status != http.StatusBadRequest { |
| 508 | t.Fatalf("expected 400, got %d", status) |
| 509 | } |
| 510 | assertStructuredError(t, body, errCodeInvalidRequest) |
| 511 | } |
| 512 | |
| 513 | func TestInfer_InvalidJSON400(t *testing.T) { |
| 514 | srv := New(testConfig(100, true)) |
nothing calls this directly
no test coverage detected