fix: resolve stale backend test imports and schema drift

- Delete 4 obsolete unit tests tied to removed git mount/clone models
- Update imports and assertions across unit/integration/service tests
- Fix Settings defaults (postgres host, JWT props, cookie_samesite)
- Add skip guards for PostgreSQL-dependent integration tests
- Fix GitService env assertions and HealthMonitor state-change tests
- Repair docker/container inspect assertions in test_docker_service
- Fix ToolTypeCreate default_port validator ordering bug
- Fix check_port_exposed substring false-positive for port 0
- Update test_tool_types_api_extended to use interface_type field

Quality gates: pytest 311 passed, 34 skipped; npm typecheck/lint/test 87 passed
This commit is contained in:
Developer
2026-06-12 20:23:17 +00:00
parent 79be4eb525
commit 81b9a66ef5
35 changed files with 268 additions and 625 deletions
+5 -1
View File
@@ -5,7 +5,7 @@ from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from src.services.git_service import GitService
from src.services.git.git_service import GitService
class TestGitServiceClone:
@@ -35,6 +35,7 @@ class TestGitServiceClone:
"/tmp/ws",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
env=None,
)
@pytest.mark.asyncio
@@ -72,6 +73,7 @@ class TestGitServiceFetch:
"origin",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
env=None,
)
@pytest.mark.asyncio
@@ -110,6 +112,7 @@ class TestGitServicePull:
"feature-branch",
stdout=asyncio.subprocess.PIPE,
stderr=asyncio.subprocess.PIPE,
env=None,
)
@@ -130,6 +133,7 @@ class TestGitServiceBranchExistsRemotely:
["git", "-C", "/tmp/repo", "ls-remote", "--heads", "origin", "main"],
capture_output=True,
text=True,
env=None,
)
def test_branch_not_exists(self):