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:
parent
0f8baeeb0d
commit
443133ffbb
1 changed files with 7 additions and 1 deletions
|
|
@ -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())
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue