Keep the lazy-read test off the embedder
Rewriting the document through client.update_document re-chunks and re-embeds, so the test needed an embedding endpoint that CI does not have. Write the row through the repository instead, matching how the rest of the file avoids the embedder.
This commit is contained in:
parent
5200b71e2b
commit
ab88188529
1 changed files with 5 additions and 1 deletions
|
|
@ -386,8 +386,12 @@ class TestVfsReadPaths:
|
|||
vfs = await sandbox._build_vfs()
|
||||
sandbox._loop = asyncio.get_running_loop()
|
||||
|
||||
# Rewrite via the repository rather than client.update_document: the
|
||||
# latter re-chunks and re-embeds, which this file deliberately avoids
|
||||
# so these tests need no embedding endpoint.
|
||||
async with HaikuRAG(temp_db_path, create=False) as client:
|
||||
await client.update_document(doc_id, content="the rewritten body")
|
||||
doc.content = "the rewritten body"
|
||||
await client.document_repository.update(doc)
|
||||
|
||||
content = await asyncio.to_thread(
|
||||
vfs.path_read_text, PurePosixPath(f"/documents/{doc_id}/content.txt")
|
||||
|
|
|
|||
Loading…
Reference in a new issue