-
Notifications
You must be signed in to change notification settings - Fork 275
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
ngclient testing: client workflow sequences #1606
Comments
When we decide on that we can use it as a start for capturing an ADR resolving #1129? |
I think these are worth testing (because it's so easy to regress into loading something twice or something), but I think making all tests do this would be ugly... I would suggest a specific set of tests that e.g. runs a few refresh(), get_targetinfo() and download_target() calls with a reasonably complex repository setup, and ensures only the expected downloads and file reads are done.
These should be checked on more tests than just a specific one... at least the root key rotation tests should ensure that local trusted metadata is the expected file. |
After experimenting in #1636 with top-level-roles update:
These are probably the most straight-forward test to implement, they tests step by step the detailed client workflow (6565365). In case of a specific need to generate many variations of a test, like in the case of keys rotation, this can be expanded in a seperate test class: #1607
These are still to be defined
To be added
Testing if local metadata is loaded is not impossible eaeb091 but as described in #1636, Testing if expired metadata from the local cache is loaded and used to verify the new version requires peeking as deep as |
If we want to define a common rule, it seems like positive tests that do not test for some exception or error need to include some of these checks to confirm that the expected result is achieved. |
The new set of tests (
If we can document the decision making process that lead to these choices (situation X -> should test for Y) maybe in the test module docstring or somewhere that would be good... but if there are no generic rules and we just need to look at individual tests, then I guess the current examples are good examples to look at. Can we close this or are there more sub issues that need to be filed first? |
Description of issue or feature request:
If needed, narrow down the scope of this issue and spawn separate ones for top-level metadata update, delegations metadata update, Fetching targets.
edit: This issue deals with top-level-metadata updates. Delegated roles and targets will be covered #1641 #1642 #1643 .
Following the high-level steps described in #1579 implement tests for the various client workflow sequences:
Decide what we want to test sometimes and what should be always included:
The tests should be
RepositorySimulator
based.The text was updated successfully, but these errors were encountered: