You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
proTES's unit tests cannot be collected (they import _create_mongo_client from FOCA and calculate_distance and exceptions that no longer exist, #168) and are not run in CI. The Celery task has no tests (#149). CI only runs integration tests against Docker Compose, which submit real tasks to public TES instances of the network, so CI depends on, and loads, production nodes. cloud-registry's test setup is the template (elixir-cloud-aai/cloud-registry#90, elixir-cloud-aai/cloud-registry#164).
How?
tests/ mirroring the package, with a conftest.py app harness as in cloud-registry: test app from the config plus a test overlay, mongomock by default, a real MongoDB when MONGODB_TEST_URI is set.
Rewrite the broken unit tests (fix: unit tests #168); mock py-tes for the relay to backends.
Tests for the Celery task task__track_task_progress (test: unit test for tasks module #149): state updates, polling, retries, final update of logs and outputs.
CI: test job (pytest) and a job running all tests against MongoDB 7.0 (service container), as in cloud-registry; a Compose smoke test (docker compose up --wait, checks of the API) against a local fake TES instead of public nodes. Remove tests/test_integration once covered.
Acceptance criteria
pytest passes locally and in CI, with mongomock and with a real MongoDB.
No test or CI job contacts external TES instances.
The Celery task and the immutability of task_original are tested.
Activity
style: adopt the shared ruff, mypy and pre-commit (#231)