Fixed tests
ci/woodpecker/push/02-build-push Pipeline was successful
ci/woodpecker/manual/02-build-push Pipeline was successful
ci/woodpecker/manual/01-test Pipeline failed

This commit is contained in:
Roman Meshko
2026-05-06 16:46:31 +03:00
parent f0044cd188
commit cd6c2d5985
8 changed files with 26 additions and 5 deletions
+1
View File
@@ -3,4 +3,5 @@ WORKDIR /app
COPY requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY . .
RUN mkdir -p /app/Logs && chmod 0777 /app/Logs
CMD ["pytest", "--csv=/results/report.csv", "-v"]
+9
View File
@@ -238,6 +238,15 @@ def image_empty_scene():
return _read_media("image_empty_scene.jpg")
@pytest.fixture(scope="session")
def image_dense():
for name in ("image_dense.jpg", "image_dense01.jpg", "image_dense02.jpg"):
p = _media_dir() / name
if p.is_file():
return p.read_bytes()
pytest.skip("missing dense image fixture")
@pytest.fixture(scope="session")
def video_short_path():
return str(_media_dir() / "video_test01.mp4")
+8 -3
View File
@@ -29,7 +29,7 @@ services:
CLASSES_JSON_PATH: /app/classes.json
volumes:
- ./fixtures:/media
- ./logs:/app/Logs
- detections-logs:/app/Logs
shm_size: 512m
mem_limit: 4g
networks:
@@ -52,7 +52,7 @@ services:
CLASSES_JSON_PATH: /app/classes.json
volumes:
- ./fixtures:/media
- ./logs:/app/Logs
- detections-logs:/app/Logs
networks:
e2e-net:
aliases:
@@ -75,6 +75,7 @@ services:
CLASSES_JSON_PATH: /app/classes.json
volumes:
- ./fixtures:/media:ro
- detections-logs:/app/Logs
shm_size: 512m
networks:
e2e-net:
@@ -92,10 +93,11 @@ services:
- mock-annotations
environment:
JWT_SECRET: test-secret-e2e-only
MEDIA_DIR: /app/fixtures
MEDIA_DIR: /media
volumes:
- ./fixtures:/media
- ./results:/results
- detections-logs:/app/Logs
networks:
- e2e-net
command: ["pytest", "--csv=/results/report.csv", "-v"]
@@ -103,3 +105,6 @@ services:
networks:
e2e-net:
driver: bridge
volumes:
detections-logs:
+1 -1
View File
@@ -59,7 +59,7 @@ def test_ft_p09_sse_event_delivery(
data = json.loads(event.data)
collected.append(data)
first_event.set()
if len(collected) >= 5:
if data.get("mediaStatus") in ("AIProcessed", "Error"):
break
except BaseException as e:
thread_exc.append(e)
+4 -1
View File
@@ -1,4 +1,5 @@
import json
import os
import threading
import time
import uuid
@@ -7,7 +8,9 @@ from pathlib import Path
import pytest
import sseclient
FIXTURES_DIR = Path(__file__).resolve().parent.parent / "fixtures"
FIXTURES_DIR = Path(
os.environ.get("MEDIA_DIR", Path(__file__).resolve().parent.parent / "fixtures")
)
_VIDEO = str(FIXTURES_DIR / "video_test01.mp4")