Skip to content

Commit

Permalink
test build_delegating_metadata with delegations=None
Browse files Browse the repository at this point in the history
  • Loading branch information
dholth committed Aug 21, 2023
1 parent 7eea62f commit c5c7eae
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions tests/test_metadata_construction.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,22 @@ def test_build_delegating_metadata():
checkformat_delegating_metadata(key_mgr)


def test_build_delegating_metadata_coverage():
# See also test_build_root_metadata.

key_mgr = build_delegating_metadata(
metadata_type="key_mgr", # 'root' or 'key_mgr'
delegations=None,
version=1,
# timestamp default: now
# expiration default: now plus root expiration default duration
)

key_mgr = wrap_as_signable(key_mgr)

checkformat_delegating_metadata(key_mgr)


def test_gen_and_write_keys():
# Make a new keypair. Returns keys and writes keys to disk.
# Then load it from disk and compare that to the return value. Exercise
Expand Down

0 comments on commit c5c7eae

Please sign in to comment.