refactor: decouple database operations from knowledge retrieval nodes (#31981)

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
This commit is contained in:
wangxiaolei
2026-02-09 13:56:55 +08:00
committed by GitHub
parent 0428ac5f3a
commit 3348b89436
12 changed files with 2453 additions and 551 deletions

View File

@ -0,0 +1,29 @@
"""
Integration tests for KnowledgeRetrievalNode.
This module provides integration tests for KnowledgeRetrievalNode with real database interactions.
Note: These tests require database setup and are more complex than unit tests.
For now, we focus on unit tests which provide better coverage for the node logic.
"""
import pytest
class TestKnowledgeRetrievalNodeIntegration:
"""
Integration test suite for KnowledgeRetrievalNode.
Note: Full integration tests require:
- Database setup with datasets and documents
- Vector store for embeddings
- Model providers for retrieval
For now, unit tests provide comprehensive coverage of the node logic.
"""
@pytest.mark.skip(reason="Integration tests require full database and vector store setup")
def test_end_to_end_knowledge_retrieval(self):
"""Test end-to-end knowledge retrieval workflow."""
# TODO: Implement with real database
pass