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

Function TestLoad_KnowledgeBaseFileMissingPath

internal/config/config_test.go:520–542  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

518}
519
520func TestLoad_KnowledgeBaseFileMissingPath(t *testing.T) {
521 cfgPath := writeTempConfig(t, `
522backends:
523 - name: b1
524 type: mock
525 timeout_ms: 100
526 cost: { unit: 1, currency: credit }
527tenants:
528 - id: t1
529routing:
530 default_backend: b1
531reliability:
532 fallback_enabled: false
533knowledge_bases:
534 - name: kb1
535 type: file
536`)
537
538 _, err := Load(cfgPath)
539 if err == nil || !strings.Contains(err.Error(), `knowledge base "kb1" type file requires path`) {
540 t.Fatalf("expected file KB path validation error, got: %v", err)
541 }
542}
543
544func TestLoad_KnowledgeBaseHTTPMissingEndpoint(t *testing.T) {
545 cfgPath := writeTempConfig(t, `

Callers

nothing calls this directly

Calls 3

writeTempConfigFunction · 0.85
LoadFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected