- Unit tests for normalize_email_address, payload_matches_participant,
format_search_result (9 test cases across 3 test classes)
- New 'test' job in CI workflow (runs before build)
- pytest.ini for pythonpath config
- Integration tests for search_emails and read_email against live Qdrant
- Indexes 3 test emails, tests search by content/participant/date
- CI: new 'integration-test' job with qdrant service, runs before build
- Unit test job ignores integration test file
The Gitea Actions runner v1.0.8 fails to start the Qdrant service container
with 'exec: ./entrypoint.sh: no such file or directory'. This is a runner bug
with how it handles service container entrypoints/CMD.
Bypass the service container mechanism by starting Qdrant manually with
docker run -d and a health check wait loop.
The Gitea Actions runner v1.0.8 fails to start the Qdrant service container
with 'exec: ./entrypoint.sh: no such file or directory'. This is a runner bug
with how it handles service container entrypoints/CMD.
Bypass the service container mechanism by starting Qdrant manually with
docker run -d and a health check wait loop.
docker run -d publishes ports to the Docker bridge network, but the
job container runs on a different Gitea Actions network. This causes
Connection refused when tests try http://localhost:6333.
Use --network container:$(hostname) so Qdrant shares the job container's
network stack, making localhost reachable.
- test_search_by_content: format_search_result() does not include
body_text, so check for the expected message_id instead.
- test_search_no_results: vector cosine similarity always returns
nearest neighbors; use a date filter far in the future to
guarantee zero results instead.
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Ajout d'une batterie de tests unitaires + intégration dans la CI.
Tests ajoutés
normalize_email_address()payload_matches_participant()format_search_result()CI
Nouveau job
testqui s'exécute avant le build Docker :pip install -r requirements.txt pytestpytest tests/ -vSi les tests échouent, le build ne part pas.
Fichiers
tests/test_server.py— 9 tests, 3 classespytest.ini— config pythonpath pour l'import desrc/.gitea/workflows/docker-build.yaml— ajout du job test