fix: resolve test failures in CI
Deploy Dashboard (Dev) / Deploy to Dev (push) Failing after 3m54s
Run Tests / Backend Tests (pull_request) Failing after 21m30s
Run Tests / Frontend Tests (pull_request) Failing after 2m10s
Run Tests / Test Summary (pull_request) Failing after 17s

- 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:
Gan, Jimmy
2026-04-26 16:11:51 +08:00
parent 0338130133
commit f00b230c5e
2 changed files with 6 additions and 2 deletions
+3 -1
View File
@@ -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):