Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add/rewrite tests for the refactored client #1309

Closed
sechkova opened this issue Mar 12, 2021 · 3 comments
Closed

Add/rewrite tests for the refactored client #1309

sechkova opened this issue Mar 12, 2021 · 3 comments
Labels
backlog Issues to address with priority for current development goals ngclient

Comments

@sechkova
Copy link
Contributor

sechkova commented Mar 12, 2021

Description of issue or feature request:

A placeholder to mark the need of reviewing the existing tests once the client refactor has progressed enough.

Sync with #1129

@sechkova sechkova added the experimental-client Items related to the development of a new client (see milestone/8 and theexperimental-client branch) label Mar 12, 2021
@sechkova sechkova added this to the Client Refactor milestone Mar 12, 2021
@sechkova sechkova mentioned this issue Mar 12, 2021
17 tasks
@jku
Copy link
Member

jku commented May 19, 2021

The coverage situation is dire:

/home/jku/src/tuf/tuf/client_rework/download.py
113->114, 114-119, 215->216, 216-243, 252->253, 253
/home/jku/src/tuf/tuf/client_rework/metadata_bundle.py
94->101, 95->103, 99->exit, 101, 103->104, 104, 115-117, 157, 161, 198->199, 199, 209->210, 210, 214->216, 216-222, 243->244, 244, 282->283, 283, 289->294, 294, 300->301, 301, 320->321, 321, 338-339, 341->342, 342, 346->347, 347, 351->355, 355, 361->362, 362-373, 378->379, 379, 421->422, 422, 427->428, 428-433, 451->452, 452, 457->458, 458
/home/jku/src/tuf/tuf/client_rework/requests_fetcher.py
102->103, 103, 136-137, 152->153, 153
/home/jku/src/tuf/tuf/client_rework/updater_rework.py
65->66, 66, 74->77, 77, 147->148, 148, 167->168, 168-170, 195->196, 196, 200->203, 203, 253->268, 258-259, 262->263, 263, 299->300, 300, 319->320, 320, 353->354, 354-356, 375->378, 388->389, 389-398, 400->401, 401-402, 421->426, 426-430, 479->480, 480-485, 487->523, 489->529, 499->511, 511-529, 540->541, 541, 556->557, 557, 571-576

I think it makes sense to start with the bundle and figure out how to efficiently and readably test every branch in the update_*() functions. A major task is probably figuring out how to define a "changing set of metadata" in the tests: we want to test not only loading a specific metadata, but then test loading new metadata that gets validated by the old one -- and do this many times while keeping it all readable.

@jku
Copy link
Member

jku commented May 21, 2021

We're omitting the new client from coverage limit for now:
python -m coverage report -m --fail-under 97 --omit "{toxinidir}/tuf/client_rework/*
this should be fixed once we get back to reasonable coverage

jku pushed a commit to jku/python-tuf that referenced this issue May 21, 2021
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
@jku jku added ngclient and removed experimental-client Items related to the development of a new client (see milestone/8 and theexperimental-client branch) labels May 21, 2021
@sechkova sechkova added the backlog Issues to address with priority for current development goals label May 26, 2021
@sechkova sechkova removed this from the weeks22-23 milestone May 26, 2021
jku pushed a commit to jku/python-tuf that referenced this issue Jun 22, 2021
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
@jku
Copy link
Member

jku commented Jun 23, 2021

oh now I've filed this twice... I'm closing this one as #1462 has a little more details

@jku jku closed this as completed Jun 23, 2021
sechkova pushed a commit to sechkova/tuf that referenced this issue Jun 25, 2021
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
MVrachev pushed a commit to MVrachev/tuf that referenced this issue Jul 1, 2021
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
jku pushed a commit to jku/python-tuf that referenced this issue Jul 5, 2021
* Use the same rules as tuf/api
* omit ngclient from coverage limits for now: theupdateframework#1309

Signed-off-by: Jussi Kukkonen <jkukkonen@vmware.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backlog Issues to address with priority for current development goals ngclient
Projects
None yet
Development

No branches or pull requests

3 participants