(t *testing.T)
| 408 | } |
| 409 | |
| 410 | func TestInfer_Agent_NotImplemented501(t *testing.T) { |
| 411 | cfg := testConfig(100, true) |
| 412 | cfg.Features.AgentEnabled = true |
| 413 | srv := New(cfg) |
| 414 | ts := httptest.NewServer(srv.Routes()) |
| 415 | defer ts.Close() |
| 416 | |
| 417 | status, body := postInfer(t, ts.URL, map[string]any{ |
| 418 | "request_type": "agent", |
| 419 | "tenant_id": "team-a", |
| 420 | "task_type": "simple", |
| 421 | "priority": "high", |
| 422 | "input": map[string]any{"text": "task"}, |
| 423 | "options": map[string]any{"stream": false, "max_tokens": 128}, |
| 424 | }) |
| 425 | if status != http.StatusNotImplemented { |
| 426 | t.Fatalf("expected 501, got %d body=%s", status, string(body)) |
| 427 | } |
| 428 | assertStructuredError(t, body, errCodeAgentNotImplemented) |
| 429 | } |
| 430 | |
| 431 | func TestInfer_Success200(t *testing.T) { |
| 432 | srv := New(testConfig(100, true)) |
nothing calls this directly
no test coverage detected