MCPcopy Create free account
hub / github.com/InferCore/InferCore / TestInfer_Agent_NotImplemented501

Function TestInfer_Agent_NotImplemented501

internal/server/server_test.go:410–429  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

408}
409
410func 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
431func TestInfer_Success200(t *testing.T) {
432 srv := New(testConfig(100, true))

Callers

nothing calls this directly

Calls 6

postInferFunction · 0.85
assertStructuredErrorFunction · 0.85
RoutesMethod · 0.80
testConfigFunction · 0.70
NewFunction · 0.70
CloseMethod · 0.65

Tested by

no test coverage detected