From bc35b8ac3e182caca3906629ffe487e641fbbe4c Mon Sep 17 00:00:00 2001 From: Vladimir Diaz Date: Tue, 12 Jun 2018 09:18:47 -0400 Subject: [PATCH] Add test 3 to the summary of conducted tests Signed-off-by: Vladimir Diaz --- tests/test_indefinite_freeze_attack.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/test_indefinite_freeze_attack.py b/tests/test_indefinite_freeze_attack.py index fa239ef5..7ae6133c 100755 --- a/tests/test_indefinite_freeze_attack.py +++ b/tests/test_indefinite_freeze_attack.py @@ -241,12 +241,15 @@ def test_without_tuf(self): def test_with_tuf(self): - # Two tests are conducted here. + # Three tests are conducted here. # # Test 1: If we find that the timestamp acquired from a mirror indicates # that there is no new snapshot file, and our current snapshot # file is expired, is it recognized as such? # Test 2: If an expired timestamp is downloaded, is it recognized as such? + # Test 3: If an expired Snapshot is downloaded, is it (1) rejected? (2) the + # local Snapshot file deleted? (3) and is the client able to recover when + # given a new, valid Snapshot? # Test 1 Begin: @@ -490,6 +493,7 @@ def test_with_tuf(self): shutil.copytree(os.path.join(self.repository_directory, 'metadata.staged'), os.path.join(self.repository_directory, 'metadata')) + # Verify that the client accepts the valid metadata file. self.repository_updater.refresh() self.assertTrue('snapshot' in self.repository_updater.metadata['current']) self.assertEqual(sorted(['root', 'targets', 'timestamp', 'snapshot']),