This repository has been archived by the owner on Mar 7, 2024. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix AddKey for targets Previously Targets' `AddKey(key, role)` was returning error that role doesn't exist in the case when role exists and already has that key. This change fixes that and alligns the function with the python-tuf reference implementation, where the key is added to delegations, even if it's not added to Roles and SuccinctRoles Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Fix delegated path prefix check Previously the target file path hash was not base64 URL encoded which ended up to not being able to properly compare if role's PathHashPrefixes contains a prefix of that hash. This change fixes the encoding Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Add SuccinctRoles.GetSuffixLen() for the purpose of testing This allows testing if the suffix len is properly calculated in the metadata Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Add test repository data improvements This change changes the targets files used for targets metadata to be simplified and neutral for the purpose of more clear and less mistake-prone test cases. It also adds new keys for additional metadata api testing Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Add more metadata api tests This change completes the metadata api test coverage with reference to the python-tuf implementations, excluding few use- cases that are not applicable Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Fix go linter checks for metadata api tests This fixes few error checks that were not handled in the metadata api tests Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> * Improve metadata hepler test functions usage This change provides tiny updates of two metalada helper functions to giarantee more stable testing over time Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com> --------- Signed-off-by: Ivana Atanasova <iyovcheva@vmware.com>
- Loading branch information