Skip to content
This repository has been archived by the owner on Mar 7, 2024. It is now read-only.

Metadata tests followup #54

Merged
merged 7 commits into from
Aug 18, 2023
Merged

Commits on Aug 18, 2023

  1. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    308881e View commit details
    Browse the repository at this point in the history
  2. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    0bee361 View commit details
    Browse the repository at this point in the history
  3. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    7f38dd2 View commit details
    Browse the repository at this point in the history
  4. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    8767bd8 View commit details
    Browse the repository at this point in the history
  5. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    d5c6370 View commit details
    Browse the repository at this point in the history
  6. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    8834c5c View commit details
    Browse the repository at this point in the history
  7. 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>
    ivanayov committed Aug 18, 2023
    Configuration menu
    Copy the full SHA
    b30c860 View commit details
    Browse the repository at this point in the history