(t *testing.T)
| 184 | } |
| 185 | |
| 186 | func testConfigWithFileKB(t *testing.T) *config.Config { |
| 187 | t.Helper() |
| 188 | dir := t.TempDir() |
| 189 | doc := filepath.Join(dir, "doc.txt") |
| 190 | content := "InferCore provides routing and fallback for AI requests.\n\nSecond chunk about observability." |
| 191 | if err := os.WriteFile(doc, []byte(content), 0o644); err != nil { |
| 192 | t.Fatal(err) |
| 193 | } |
| 194 | cfg := testConfig(100, true) |
| 195 | cfg.KnowledgeBases = []config.KnowledgeBaseConfig{ |
| 196 | {Name: "kb1", Type: "file", Path: dir}, |
| 197 | } |
| 198 | return cfg |
| 199 | } |
| 200 | |
| 201 | func TestInfer_RAG_WithFileKB_Success200(t *testing.T) { |
| 202 | cfg := testConfigWithFileKB(t) |
no test coverage detected