@@ -242,10 +242,9 @@ def test_snapshot_serialization(self, test_case_data: str):
242242 "no path attribute" :
243243 '{"keyids": ["keyid"], "name": "a", "terminating": false, \
244244 "path_hash_prefixes": ["h1", "h2"], "threshold": 99}' ,
245- "no hash or path prefix" :
246- '{"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3}' ,
247245 "unrecognized field" :
248- '{"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3, "foo": "bar"}' ,
246+ '{"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], \
247+ "terminating": true, "threshold": 3, "foo": "bar"}' ,
249248 }
250249
251250 @run_sub_tests_with_dataset (valid_delegated_roles )
@@ -257,10 +256,10 @@ def test_delegated_role_serialization(self, test_case_data: str):
257256
258257 valid_delegations : DataSet = {
259258 "all" : '{"keys": {"keyid" : {"keytype": "rsa", "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"}}}, \
260- "roles": [ {"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3} ]}' ,
259+ "roles": [ {"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], " terminating": true, "threshold": 3} ]}' ,
261260 "unrecognized field" :
262261 '{"keys": {"keyid" : {"keytype": "rsa", "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"}}}, \
263- "roles": [ {"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3} ], \
262+ "roles": [ {"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], " terminating": true, "threshold": 3} ], \
264263 "foo": "bar"}' ,
265264 }
266265
@@ -305,13 +304,13 @@ def test_targetfile_serialization(self, test_case_data: str):
305304 "targets": { "file.txt": {"length": 12, "hashes": {"sha256" : "abc"} } }, \
306305 "delegations": {"keys": {"keyid" : {"keytype": "rsa", \
307306 "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"} }}, \
308- "roles": [ {"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3} ]} \
307+ "roles": [ {"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], " terminating": true, "threshold": 3} ]} \
309308 }' ,
310309 "empty targets" : '{"_type": "targets", "spec_version": "1.0.0", "version": 1, "expires": "2030-01-01T00:00:00Z", \
311310 "targets": {}, \
312311 "delegations": {"keys": {"keyid" : {"keytype": "rsa", \
313312 "scheme": "rsassa-pss-sha256", "keyval": {"public": "foo"} }}, \
314- "roles": [ {"keyids": ["keyid"], "name": "a", "terminating": true, "threshold": 3} ]} \
313+ "roles": [ {"keyids": ["keyid"], "name": "a", "paths": ["fn1", "fn2"], " terminating": true, "threshold": 3} ]} \
315314 }' ,
316315 "no delegations" : '{"_type": "targets", "spec_version": "1.0.0", "version": 1, "expires": "2030-01-01T00:00:00Z", \
317316 "targets": { "file.txt": {"length": 12, "hashes": {"sha256" : "abc"} } } \
0 commit comments