test: coverage tracker (63%)
Opened this issue · 0 comments
ocervell commented
Goal: improve coverage (current: 63%)
New tests to add:
Celery:
-
revoke_task
(secator/celery.py:104
) -
chunker
(secator/celery.py:114
) -
break_task
(secator/celery.py:117
) -
run_task
(secator/celery.py:148
) -
run_workflow
(secator/celery.py:159
) -
run_scan
(secator/celery.py:170
) -
run_command
task chunks (secator/celery.py:243:268
,secator/celery.py:324:326
,secator/celery.py:350:352
) -
run_command
task failure (secator/celery.py:297
,secator/celery.py:313:317
) -
is_celery_worker_alive
(secator/celery.py:361:369
)
To do this, we can simply resume the work started in tests/unit/celery.py
and:
- Run
secator worker
in the tasksetUp(self)
- Add a test to run a task with chunk split
- Add a test for
is_celery_worker_alive
CLI:
Add a tests/unit/cli.py
to test all CLI tasks.
Config:
- Add a test for
config get
when key does not exist. - Add a test for
config get
when no key is given (full config) - Add a test for
config set
when key does not exist. - Add a test for
config set
when existing value is a list (cast from string to list) - Add a test for
config set
when existing value is a dict (cast from string to dict) - Add a test for
config set
when existing value is an int / float / Path (cast from string to int / float / Path) - Add a test for
config save
with no arguments when no target path in original config - Add a test for
config print
- Add a test for
config parse
when config file is not found - Add a test for
config dump
withpartial=False
- Add a test for
config apply env overrides
when validation error happen on env variable - Add a test for
download_files
method - Add a test for
config parse
when user config path does not exist