Implementation Plan — Issue #50: Integration tests for Search Service
Metadata
| Field |
Value |
| Issue |
#50 |
| Title |
Integration tests for Search Service |
| Milestone |
Phase 6: Search Service |
| Labels |
— |
| Status |
COMPLETED |
| Language |
Python |
| Related Plans |
issue-049.md, issue-046.md, issue-047.md, issue-048.md |
| Blocked by |
#49 |
Acceptance Criteria
Architecture Analysis
Approach
Integration tests wire together real service components (SearXNGClient, PageExtractor, Summarizer, SearchServiceImpl) with mocked external services:
- SearXNG HTTP API → mocked via
aioresponses
- Model Gateway gRPC → mocked via in-process gRPC server
- Audit Service gRPC → mocked via in-process gRPC server
- Web pages for extraction → mocked via
aioresponses
Difference from Unit Tests
test_service.py uses AsyncMock for all dependencies
- Integration tests use real component instances with only external HTTP/gRPC mocked
Files to Create/Modify
| File |
Action |
Purpose |
services/search/tests/test_integration.py |
Create |
Integration tests |
implementation-plans/issue-050.md |
Create |
Plan |
implementation-plans/_index.md |
Modify |
Add entry |
Deviation Log