Skip to content

Commit

Permalink
Fix repository_tool test to expect promiscuous delegation to work
Browse files Browse the repository at this point in the history
A and B both delegating to C works and is OK.

We should probably add more testing for this, covering more
complex situations.

Signed-off-by: Sebastien Awwad <sebastien.awwad@gmail.com>
  • Loading branch information
awwad committed Mar 14, 2018
1 parent bd8df73 commit e5ce022
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions tests/test_repository_tool.py
Original file line number Diff line number Diff line change
Expand Up @@ -1189,6 +1189,11 @@ def test_delegate(self):
self.assertEqual(self.targets_object.get_delegated_rolenames(),
['tuf'])

# Try to delegate to a role that has already been delegated. Expect success.
self.targets_object.delegate(rolename, public_keys, paths, threshold,
terminating=False, list_of_targets=list_of_targets,
path_hash_prefixes=path_hash_prefixes)

# Test for targets that do not exist under the targets directory.
self.targets_object.revoke(rolename)
self.assertRaises(securesystemslib.exceptions.Error,
Expand Down

0 comments on commit e5ce022

Please sign in to comment.