elixir-cloud-aai / proTES

Proxy service for injecting middleware into GA4GH TES requests
Apache License 2.0
5 stars 6 forks source link

test: unit test for tasks module #149

Open SohamRatnaparkhi opened 1 year ago

SohamRatnaparkhi commented 1 year ago

Is your feature request related to a problem? Please describe. This issue is in connection to issue #15 The current code-base does not have a test for tasks module.

This is a Python module that has scripts defining a Celery task named task__track_task_progress that is responsible for relaying a task run request to a remote TES (Task Execution Service) API, and then tracking the progress of the task.

Within the task, there is code for creating a database client, updating the state of the task to INITIALIZING, fetching the task log, and then tracking the task progress by continuously polling the remote TES API. The task state is updated in the database as the task progresses, and finally, once the task has finished, the document in the database is updated to reflect the final state and the output logs.

Describe the solution you'd like The test will have following test:

Additional context The tests will be added to test folder.

uniqueg commented 1 year ago

Thanks @SohamRatnaparkhi, please go ahead if you like :)