test multivol index reconstruct with hole and header corruption
[python-delta-tar] / testing / test_recover.py
index 025dd2e..66ba247 100644 (file)
@@ -880,3 +880,52 @@ class GenIndexIntactMultiGZAESTest (GenIndexIntactBaseTest):
     PASSWORD    = TEST_PASSWORD
     MISSING     = 2
 
+
+class GenIndexCorruptHoleBaseTest (GenIndexTest):
+    """
+    Recreate index from file with hole.
+    """
+    COMPRESSION = None
+    PASSWORD    = None
+    FAILURES    = 0
+    CORRUPT     = corrupt_hole
+    VOLUMES     = 1
+    MISMATCHES  = 1
+
+class GenIndexCorruptHoleTest (GenIndexCorruptHoleBaseTest):
+    pass
+
+class GenIndexCorruptHoleGZTest (GenIndexCorruptHoleBaseTest):
+    COMPRESSION = "#gz"
+    MISSING     = 2
+
+class GenIndexCorruptHoleGZAESTest (GenIndexCorruptHoleBaseTest):
+    COMPRESSION = "#gz"
+    PASSWORD    = TEST_PASSWORD
+    MISSING     = 2
+
+
+
+class GenIndexCorruptEntireHeaderBaseTest (GenIndexTest):
+    """
+    Recreate index from file with hole.
+    """
+    COMPRESSION = None
+    PASSWORD    = None
+    FAILURES    = 0
+    CORRUPT     = corrupt_entire_header
+    VOLUMES     = 1
+    MISMATCHES  = 1
+
+class GenIndexCorruptEntireHeaderTest (GenIndexCorruptEntireHeaderBaseTest):
+    pass
+
+class GenIndexCorruptEntireHeaderGZTest (GenIndexCorruptEntireHeaderBaseTest):
+    COMPRESSION = "#gz"
+    MISSING     = 2
+
+class GenIndexCorruptEntireHeaderGZAESTest (GenIndexCorruptEntireHeaderBaseTest):
+    COMPRESSION = "#gz"
+    PASSWORD    = TEST_PASSWORD
+    MISSING     = 2
+