Add admin panel, WebSocket support, and API versioning
CI / Lint & Format (push) Failing after 28s
CI / Tests (push) Has been skipped
CI / Security Scan (push) Failing after 8s
CI / Docker Build (push) Has been skipped

Introduce an admin portal (React + Nginx), WebSocket routing, and
API versioning middleware with `/api/v1/` prefix deprecation.
Add master API key authentication, new Prometheus metrics for AI
token consumption and active WebSockets, and extend S3 config
with a public endpoint URL. Update test paths and fixtures to
align with the new routing structure.
This commit is contained in:
2026-06-22 11:25:22 -04:00
parent d68deb9c74
commit 2f2a5e9b4a
158 changed files with 64811 additions and 503 deletions
+8 -4
View File
@@ -9,9 +9,10 @@ from pathlib import Path
# ── Tests EXIF ────────────────────────────────────────────────
def test_exif_missing_file():
@pytest.mark.asyncio
async def test_exif_missing_file():
from app.services.exif_service import extract_exif
result = extract_exif("/tmp/non_existant.jpg")
result = await extract_exif("/tmp/non_existant.jpg")
assert result["make"] is None
assert result["gps_lat"] is None
assert result["raw"] == {}
@@ -32,10 +33,11 @@ def test_exif_dms_to_decimal():
# ── Tests OCR ─────────────────────────────────────────────────
def test_ocr_disabled(monkeypatch):
@pytest.mark.asyncio
async def test_ocr_disabled(monkeypatch):
monkeypatch.setattr("app.services.ocr_service.settings.OCR_ENABLED", False)
from app.services.ocr_service import extract_text
result = extract_text("/tmp/test.jpg")
result = await extract_text("/tmp/test.jpg")
assert result["has_text"] is False
assert result["text"] is None
@@ -72,6 +74,8 @@ def test_image_detail_schema():
# Simule un objet Image ORM
mock_img = MagicMock()
mock_img.client_id = "test-client-123"
mock_img.client.name = "Test Client"
mock_img.id = 1
mock_img.uuid = "abc-123"
mock_img.original_name = "test.jpg"