Fix Integration Tests: Dependencies, Config und Bugs

- test.sh: .venv Support und verbesserte API Key Erkennung
- test_integration.py: Cleanup Logik repariert (Duplicate Token)
- docker-compose.yml: Port 3306 für lokale Tests exposed
- rag_service.py: NameError und Collection Naming Bug gefixt
This commit is contained in:
2025-12-07 20:31:05 +01:00
parent 41f363eb27
commit 0e7865ee57
4 changed files with 49 additions and 7 deletions

View File

@@ -45,6 +45,8 @@ class RAGService:
def _get_collection_name(self, locale: str) -> str:
"""Generate collection name for a given locale."""
if not locale:
return self.collection_prefix
return f"{self.collection_prefix}_{locale}"
def _ensure_collection_exists(self, locale: str) -> str:
@@ -118,6 +120,12 @@ class RAGService:
}
# Chunk and embed the content
chunks_with_embeddings = self.embedding_service.chunk_and_embed_post(
post_content=body_md,
post_id=post_id,
post_title=title
)
if not chunks_with_embeddings:
return {
'post_id': post_id,