Skip to content

ngclient Updater: write tests to handling coverage report #1499

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

Closed
MVrachev opened this issue Jul 15, 2021 · 5 comments · Fixed by #1564
Closed

ngclient Updater: write tests to handling coverage report #1499

MVrachev opened this issue Jul 15, 2021 · 5 comments · Fixed by #1564
Assignees
Labels
backlog Issues to address with priority for current development goals ngclient testing
Milestone

Comments

@MVrachev
Copy link
Collaborator

MVrachev commented Jul 15, 2021

Description of issue or feature request:
This is the minimal amount of testing we should have to enable coverage for the ngclient updater and the first step of resolving #1462 for the Updater.
When resolving the missing lines reported by coverage we will decide if we want to handle all of them
or there is a sense of leaving some of them.

@MVrachev MVrachev added testing ngclient backlog Issues to address with priority for current development goals labels Jul 15, 2021
@MVrachev
Copy link
Collaborator Author

We should remember to test downloading files with filenames HASH.FILENAME.EXT or when consistent_snapshot is True.

@joshuagl joshuagl removed the backlog Issues to address with priority for current development goals label Jul 20, 2021
@MVrachev MVrachev added the backlog Issues to address with priority for current development goals label Jul 28, 2021
@MVrachev
Copy link
Collaborator Author

The current coverage all percentage reported for tuf/api/ngclient/updater.py is 77 %.

@joshuagl
Copy link
Member

From @MVrachev in #1463 (review)

there are a couple of code paths not tested yet (according to coverage all):

delegation role with terminating option turn on
test when a target is not found
reaching the max limit of visiting delegations, but there are more delegations left
Additionally, we never test DelegatedRole.is_in_trusted_paths() when path_hash_prefixes is set and thus never actually test calculating the hashes.

@jku
Copy link
Member

jku commented Aug 5, 2021

also

  • we're probably not testing cycle prevention in _preorder_depth_first_walk(): this is the if (role_name, parent_role) in visited_role_names branch
  • test that terminating actually prevents backtracking to other roles (but does not prevent e.g. finding an earlier sibling role)

@sechkova
Copy link
Contributor

sechkova commented Sep 1, 2021

Up to now the coverage has been/will be improved by:

I am assigning this to myself to finish the work and include ngclient to the coverage report.

@sechkova sechkova self-assigned this Sep 1, 2021
@sechkova sechkova added this to the Sprint 7 milestone Sep 1, 2021
@jku jku closed this as completed in #1564 Sep 8, 2021
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 testing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants