diff --git a/tests/test_indefinite_freeze_attack.py b/tests/test_indefinite_freeze_attack.py index d404b94d..1f76daa0 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: @@ -492,6 +495,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']),