MCPcopy Index your code
hub / github.com/InferCore/InferCore / testConfigWithFileKB

Function testConfigWithFileKB

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

Source from the content-addressed store, hash-verified

184}
185
186func 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
201func TestInfer_RAG_WithFileKB_Success200(t *testing.T) {
202 cfg := testConfigWithFileKB(t)

Calls 1

testConfigFunction · 0.70

Tested by

no test coverage detected