test: Add database deletion test for Weaviate vector database

Added database deletion test for Weaviate vector database

Test COG-488
This commit is contained in:
Igor Ilic 2024-11-21 18:37:09 +01:00
parent 0f8baeeb0d
commit 443133ffbb

View file

@ -57,9 +57,15 @@ 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)
collections = get_vector_engine().client.collections.list_all()
assert len(collections) == 0, "Weaviate vector database is not empty"
if __name__ == "__main__":
import asyncio
asyncio.run(main())