test: Add database deletion test for qdrant

Added testing of database deletion for qdrant

Test COG-488
This commit is contained in:
Igor Ilic 2024-11-21 18:19:23 +01:00
parent 54daa6986c
commit 0f8baeeb0d

View file

@ -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())