test: run pytest in CI — real unit job + Qdrant-backed integration job #52
@@ -60,6 +60,18 @@ def qdrant_setup():
|
||||
model = get_embedding_model()
|
||||
collection_name = os.environ["COLLECTION_NAME"]
|
||||
|
||||
# Debug instrumentalisation — truth about which server we are talking to
|
||||
# and what it holds (CI 404 diagnosis).
|
||||
import logging
|
||||
dbg = logging.getLogger("integration.debug")
|
||||
dbg.warning("qdrant client url: %s", client.rest_uri)
|
||||
server_info = None
|
||||
try:
|
||||
server_info = client.get_collections()
|
||||
dbg.warning("collections BEFORE: %s", [c.name for c in server_info.collections])
|
||||
except Exception as e:
|
||||
dbg.warning("get_collections FAILED: %s", e)
|
||||
|
||||
# Clean up from previous runs
|
||||
try:
|
||||
client.delete_collection(collection_name)
|
||||
@@ -74,6 +86,14 @@ def qdrant_setup():
|
||||
size=len(probe), distance=models.Distance.COSINE
|
||||
),
|
||||
)
|
||||
# Assert the collection is actually visible right after creation
|
||||
names_after = [c.name for c in client.get_collections().collections]
|
||||
dbg.warning("collections AFTER create: %s", names_after)
|
||||
if collection_name not in names_after:
|
||||
raise RuntimeError(
|
||||
f"Fixture created collection {collection_name} but it is not in "
|
||||
f"get_collections(): {names_after} — pointing at {client.rest_uri}"
|
||||
)
|
||||
|
||||
# Index test emails
|
||||
for email in TEST_EMAILS:
|
||||
|
||||
Reference in new issue
Block a user