prefer index iterator for recovery
authorPhilipp Gesang <philipp.gesang@intra2net.com>
Thu, 10 Aug 2017 11:06:30 +0000 (13:06 +0200)
committerThomas Jarosch <thomas.jarosch@intra2net.com>
Mon, 2 Apr 2018 11:34:09 +0000 (13:34 +0200)
testing/test_recover.py

index 1a2193e..a5b37c4 100644 (file)
@@ -130,17 +130,19 @@ class RecoverTest (BaseTest):
 
         os.chdir (curdir)
         # but recover will succeed
-        dtar.restore_backup(target_path=dst_path,
-                            backup_tar_path=backup_full)
+        dtar.recover_backup(target_path=dst_path,
+                            backup_indexes_paths=[
+                                "%s/%s" % (bak_path, index_file)
+                            ])
 
         # with one file missing
-        missing = 0
+        missing = []
         for key, value in self.hash.items ():
             if os.path.exists (key):
                 assert value == self.md5sum (key)
             else:
-                missing += 1
-        assert missing == 1
+                missing.append (key)
+        assert len (missing) == 1
 
         shutil.rmtree (src_path)