test: Add database deletion test for qdrant
Added testing of database deletion for qdrant Test COG-488
This commit is contained in:
parent
54daa6986c
commit
0f8baeeb0d
1 changed files with 8 additions and 1 deletions
|
|
@ -59,9 +59,16 @@ async def main():
|
|||
print(f"{result}\n")
|
||||
|
||||
history = await cognee.get_search_history()
|
||||
|
||||
assert len(history) == 6, "Search history is not correct."
|
||||
|
||||
await cognee.prune.prune_data()
|
||||
assert not os.path.isdir(data_directory_path), "Local data files are not deleted"
|
||||
|
||||
await cognee.prune.prune_system(metadata=True)
|
||||
qdrant_client = get_vector_engine().get_qdrant_client()
|
||||
collections_response = await qdrant_client.get_collections()
|
||||
assert len(collections_response.collections) == 0, "QDrant vector database is not empty"
|
||||
|
||||
if __name__ == "__main__":
|
||||
import asyncio
|
||||
asyncio.run(main())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue