# but recover will succeed
failed = dtar.rescue_backup(target_path=self.dst_path,
backup_tar_path=backup_full)
-
- assert len (failed) == self.FAILURES
-
# with one file missing
missing = []
mismatch = []
else:
missing.append (key)
+ assert len (failed) == self.FAILURES
assert len (missing) == (self.MISSING if self.MISSING is not None
else self.FAILURES)
assert len (mismatch) == self.MISMATCHES
"""
COMPRESSION = None
PASSWORD = None
- FAILURES = 3
+ FAILURES = 0
CORRUPT = corrupt_hole
VOLUMES = 2 # request two vols to swell up the first one
- MISMATCHES = 1
+ MISMATCHES = 2 # intersected by hole
+ MISSING = 1 # excised by hole
class RescueCorruptHoleTest (RescueCorruptHoleBaseTest):
- FAILURES = 0
- MISMATCHES = 1 # intersected by hole
- MISSING = 1 # excised by hole
+ pass
class RescueCorruptHoleGZTest (RescueCorruptHoleBaseTest):
COMPRESSION = "#gz"
- MISSING = 2
+ # the decompressor explodes in our face processing the first dummy, nothing
+ # we can do to recover
+ FAILURES = 1
class RescueCorruptHoleGZAESTest (RescueCorruptHoleBaseTest):
COMPRESSION = "#gz"
PASSWORD = TEST_PASSWORD
- MISSING = 2
+ # again, ignoring the crypto errors yields a bad zlib stream causing the
+ # decompressor to abort where the hole begins; the file is extracted up
+ # to this point though
+ FAILURES = 1
###############################################################################
# index