Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Additional tests for containers with 0 or >1 items
Those tests are needed to cover use cases when syntatcticly as standalone objects the metadata classes and their helper classes defined in tuf/api/metadata.py are valid even if they cannot be verified. An example where an object is valid, but cannot be verified is if we have a Role instance with an empty list of "keyids". This instance is valid and can be created, but cannot be verified because there is a requirement that threshold should be above 1, meaning that there should be at least 1 element inside the "keyids" list to complete succesfull threshold verification. The situation is the same for the rest of tests I am adding in this commit: - Root object without keys - Root object without roles - DelegationRole object with empty keyids - DelegationRole object with an empty list of "paths" - DelegationRole object with an empty list of "path_hash_prefixes" all of these objects can be instatied, but cannot complete succesfull threshold verification. Signed-off-by: Martin Vrachev <[email protected]>
- Loading branch information