Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
new API: test containers for zero or more elements
Test metadata (de)serialization with input data containing containers with zero or more elements. Here is the status for the different use cases: Root keys: - many keys: added Root roles: - many roles: added Root role keyids: - many keids: already added in #1481 MetaFile hashes: - many hashes: already tested - zero hashes: added. Testing as invalid test case. Delegation keys: - many keys: added Delegation role keyids: - many keyids: added Delegation role paths: - many paths: already tested Delegation role path_hash_prefixes: - many path_hash_path_prefixes: already tested According to the spec having an empty container for any of these cases: - Root keys - Root roles - Root role keyids - Delegation keys - DelegationRole keyids - DelegationRole paths - DelegationRole path_hash_prefixes is not allowed, but for the purpose of interactive object construction we don't block those use-cases. We don't want to add tests, because we don't want to advertise this behavior. In the future, we are going to add validation that those cases don't occur which will be called when serializing the object back to bytes/dictionary/file. Signed-off-by: Martin Vrachev <[email protected]>
- Loading branch information