From e5ce022899b16233f733991812f4214664096c7d Mon Sep 17 00:00:00 2001 From: Sebastien Awwad Date: Tue, 23 Jan 2018 10:37:15 -0500 Subject: [PATCH] Fix repository_tool test to expect promiscuous delegation to work 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 --- tests/test_repository_tool.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_repository_tool.py b/tests/test_repository_tool.py index 7d2e6e6ccd..6e77f0c72e 100755 --- a/tests/test_repository_tool.py +++ b/tests/test_repository_tool.py @@ -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,