fix: resolve test failures in CI
- Frontend: Fix Svelte plugin hot module config for vitest - Backend: Ensure conversation tracker uses mocked database in tests Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -230,14 +230,16 @@ def mock_httpx_client():
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def test_app(mock_config, temp_auth_file, temp_rbac_file, mock_docker_client):
|
||||
def test_app(mock_config, temp_auth_file, temp_rbac_file, mock_docker_client, mock_conversation_db):
|
||||
"""Create FastAPI test client with mocked dependencies."""
|
||||
# Reload routers to pick up new config values
|
||||
import importlib
|
||||
|
||||
import routers.files
|
||||
import routers.conversation_tracker
|
||||
|
||||
importlib.reload(routers.files)
|
||||
importlib.reload(routers.conversation_tracker)
|
||||
|
||||
# Patch Docker client before importing main
|
||||
with patch("docker.DockerClient", return_value=mock_docker_client):
|
||||
|
||||
Reference in New Issue
Block a user