(t *testing.T)
| 518 | } |
| 519 | |
| 520 | func TestLoad_KnowledgeBaseFileMissingPath(t *testing.T) { |
| 521 | cfgPath := writeTempConfig(t, ` |
| 522 | backends: |
| 523 | - name: b1 |
| 524 | type: mock |
| 525 | timeout_ms: 100 |
| 526 | cost: { unit: 1, currency: credit } |
| 527 | tenants: |
| 528 | - id: t1 |
| 529 | routing: |
| 530 | default_backend: b1 |
| 531 | reliability: |
| 532 | fallback_enabled: false |
| 533 | knowledge_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 | |
| 544 | func TestLoad_KnowledgeBaseHTTPMissingEndpoint(t *testing.T) { |
| 545 | cfgPath := writeTempConfig(t, ` |
nothing calls this directly
no test coverage detected