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 the threshold should be above 1, meaning that there should be at least 1 element inside the "keyids" list to complete successful threshold verification. The situation is the same for the rest of the tests I am adding to 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 instantiated, but cannot complete successfully threshold verification. Signed-off-by: Martin Vrachev <[email protected]>
- Loading branch information