MCPcopy Index your code
hub / github.com/coder/coder / TestSearchSnapshot_DeletedDocsExcluded

Function TestSearchSnapshot_DeletedDocsExcluded

agent/filefinder/query_test.go:166–178  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

164}
165
166func TestSearchSnapshot_DeletedDocsExcluded(t *testing.T) {
167 t.Parallel()
168 idx := filefinder.NewIndex()
169 idx.Add("handler.go", 0)
170 idx.Remove("handler.go")
171 snap := idx.Snapshot()
172 cands := filefinder.SearchSnapshotForTest(filefinder.NewQueryPlanForTest("handler"), snap, 100)
173 for _, c := range cands {
174 if c.Path == "handler.go" {
175 t.Error("deleted doc should not appear in results")
176 }
177 }
178}
179
180func TestSearchSnapshot_Limit(t *testing.T) {
181 t.Parallel()

Callers

nothing calls this directly

Calls 5

AddMethod · 0.95
RemoveMethod · 0.95
SnapshotMethod · 0.95
NewIndexFunction · 0.92
ErrorMethod · 0.45

Tested by

no test coverage detected