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
+4 -4
View File
@@ -87,7 +87,7 @@ def authenticated_client(test_client) -> Generator[TestClient, None, None]:
"""Provide an authenticated test client with a test user."""
import uuid
from src.auth.session import create_session_cookie
from src.models.user import User
from src.models.user.user import User
user_id = str(uuid.uuid4())
settings = Settings()
@@ -135,8 +135,8 @@ def authenticated_client(test_client) -> Generator[TestClient, None, None]:
def test_project_and_repo(authenticated_client) -> tuple[str, str]:
"""Create a project and repository directly in the database."""
import uuid
from src.models.project import Project
from src.models.git_repository import GitRepository
from src.models.project.project import Project
from src.models.project.git_repository import GitRepository
project_id = uuid.uuid4()
repo_id = uuid.uuid4()
@@ -195,7 +195,7 @@ def admin_client(test_client) -> Generator[TestClient, None, None]:
"""Provide an authenticated test client with an admin user."""
import uuid
from src.auth.session import create_session_cookie
from src.models.user import User
from src.models.user.user import User
user_id = str(uuid.uuid4())
settings = Settings()