mirror of
https://github.com/theupdateframework/python-tuf
synced 2026-05-24 10:08:28 +00:00
Add two more invalid serialization tests
Those tests are about missing "keys" and "roles" attributes in Targets.Delegations. Signed-off-by: Martin Vrachev <mvrachev@vmware.com>
This commit is contained in:
parent
1f77b107df
commit
0d4d7f820c
1 changed files with 7 additions and 0 deletions
|
|
@ -319,6 +319,13 @@ def test_invalid_delegated_role_serialization(self, test_case_data: str):
|
|||
|
||||
invalid_delegations: utils.DataSet = {
|
||||
"empty delegations": "{}",
|
||||
"missing keys": '{ "roles": [ \
|
||||
{"keyids": ["keyid"], "name": "a", "terminating": true, "paths": ["fn1"], "threshold": 3}, \
|
||||
{"keyids": ["keyid2"], "name": "b", "terminating": true, "paths": ["fn2"], "threshold": 4} ] \
|
||||
}',
|
||||
"missing roles": '{"keys": { \
|
||||
"keyid1" : {"keytype": "rsa", "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"}}, \
|
||||
"keyid2" : {"keytype": "ed25519", "scheme": "ed25519", "keyval": {"public": "bar"}}}}',
|
||||
"bad keys": '{"keys": "foo", \
|
||||
"roles": [{"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], "terminating": false, "threshold": 3}]}',
|
||||
"bad roles": '{"keys": {"keyid" : {"keytype": "rsa", "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"}}}, \
|
||||
|
|
|
|||
Loading…
Reference in a new issue