Open ocervell opened 4 months ago
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
secator/celery.py:243:268
secator/celery.py:324:326
secator/celery.py:350:352
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:
tests/unit/celery.py
secator worker
setUp(self)
CLI: Add a tests/unit/cli.py to test all CLI tasks.
tests/unit/cli.py
Config:
config get
config set
config save
config print
config parse
config dump
partial=False
config apply env overrides
download_files
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:secator worker
in the tasksetUp(self)
is_celery_worker_alive
CLI: Add a
tests/unit/cli.py
to test all CLI tasks.Config:
config get
when key does not exist.config get
when no key is given (full config)config set
when key does not exist.config set
when existing value is a list (cast from string to list)config set
when existing value is a dict (cast from string to dict)config set
when existing value is an int / float / Path (cast from string to int / float / Path)config save
with no arguments when no target path in original configconfig print
config parse
when config file is not foundconfig dump
withpartial=False
config apply env overrides
when validation error happen on env variabledownload_files
methodconfig parse
when user config path does not exist