File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
src/services/code-index/vector-store/__tests__ Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -227,7 +227,10 @@ describe("QdrantVectorStore", () => {
227227 mockQdrantClientInstance . createCollection . mockRejectedValue ( createError )
228228 vitest . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } ) // Suppress console.error
229229
230- await expect ( vectorStore . initialize ( ) ) . rejects . toThrow ( createError )
230+ // The actual error message includes the URL and error details
231+ await expect ( vectorStore . initialize ( ) ) . rejects . toThrow (
232+ / F a i l e d t o c o n n e c t t o Q d r a n t v e c t o r d a t a b a s e | v e c t o r S t o r e \. q d r a n t C o n n e c t i o n F a i l e d / ,
233+ )
231234
232235 expect ( mockQdrantClientInstance . getCollection ) . toHaveBeenCalledTimes ( 1 )
233236 expect ( mockQdrantClientInstance . createCollection ) . toHaveBeenCalledTimes ( 1 )
@@ -287,7 +290,10 @@ describe("QdrantVectorStore", () => {
287290 vitest . spyOn ( console , "error" ) . mockImplementation ( ( ) => { } )
288291 vitest . spyOn ( console , "warn" ) . mockImplementation ( ( ) => { } )
289292
290- await expect ( vectorStore . initialize ( ) ) . rejects . toThrow ( deleteError )
293+ // The actual error message includes the URL and error details
294+ await expect ( vectorStore . initialize ( ) ) . rejects . toThrow (
295+ / F a i l e d t o c o n n e c t t o Q d r a n t v e c t o r d a t a b a s e | v e c t o r S t o r e \. q d r a n t C o n n e c t i o n F a i l e d / ,
296+ )
291297
292298 expect ( mockQdrantClientInstance . getCollection ) . toHaveBeenCalledTimes ( 1 )
293299 expect ( mockQdrantClientInstance . deleteCollection ) . toHaveBeenCalledTimes ( 1 )
You can’t perform that action at this time.
0 commit comments