langchain/libs/partners/qdrant/tests/integration_tests/conftest.py
Anush a653b209ba
qdrant: test new QdrantVectorStore (#24165)
## Description

This PR adds integration tests to follow up on #24164.

By default, the tests use an in-memory instance.

To run the full suite of tests, with both in-memory and Qdrant server:

```
$ docker run -p 6333:6333 qdrant/qdrant

$ make test

$ make integration_test
```

---------

Co-authored-by: Erick Friis <erick@langchain.dev>
2024-07-12 23:59:30 +00:00

16 lines
489 B
Python

import os
from qdrant_client import QdrantClient
from tests.integration_tests.fixtures import qdrant_locations
def pytest_runtest_teardown() -> None:
"""Clean up all collections after the each test."""
for location in qdrant_locations():
client = QdrantClient(location=location, api_key=os.getenv("QDRANT_API_KEY"))
collections = client.get_collections().collections
for collection in collections:
client.delete_collection(collection.name)