MISMATCHES = 0 # files that were restored but corrupted
CORRUPT = corrupt_payload_start
VOLUMES = 1
+ MISSING = None # normally the number of failures
def setUp(self):
mismatch.append (key)
else:
missing.append (key)
- assert len (missing) == self.FAILURES
+
+ # usually, an object whose extraction fails will not be found on
+ # disk afterwards so the number of failures equals that of missing
+ # files. however, some modes will create partial files for objects
+ # spanning multiple volumes that contain the parts whose checksums
+ # were valid.
+ assert len (missing) == (self.MISSING if self.MISSING is not None
+ else self.FAILURES)
assert len (mismatch) == self.MISMATCHES
shutil.rmtree (self.dst_path)
# the object is recreated from the first header of the second volume,
# containing only the remainder of the data.
MISMATCHES = 1
+ MISSING = 0
class RecoverCorruptTrailingDataGZAESTestBase (RecoverTest):