Skip to content

Commit

Permalink
fixup! repozo: support incremental recover
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebatyne committed Oct 23, 2024
1 parent 27d6296 commit acadc7a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/ZODB/scripts/tests/test_repozo.py
Original file line number Diff line number Diff line change
Expand Up @@ -1068,7 +1068,10 @@ def test_w_incr_recover_from_incr_backup(self):
'/backup/2010-05-14-04-05-06.deltafs 3 6 2bb225f0ba9a58930757a868ed57d9a3\n' # noqa: E501 line too long
'/backup/2010-05-14-06-07-08.deltafs 6 9 defb99e69a9f1f6e06f15006b1f166ae\n' # noqa: E501 line too long
'/backup/2010-05-14-08-09-10.deltafs 9 12 45054f47ac3305a2a33e9bcceadff712\n') # noqa: E501 line too long
os.unlink(os.path.join(self._repository_directory, '2010-05-14-04-05-06.deltafs'))
self._callFUT(options)
self.assertNotIn('falling back to a full recover.',
sys.stderr.getvalue())
self.assertEqual(_read_file(output), b'AAABBBCCCDDD')
self.assertFalse(os.path.exists(output + '.part'))

Expand All @@ -1090,6 +1093,8 @@ def test_w_incr_backup_with_verify_sum_inconsistent(self):
'/backup/2010-05-14-08-09-10.deltafs 9 12 45054f47ac3305a2a33e9bcceadff712\n') # noqa: E501 line too long
from ZODB.scripts.repozo import VerificationFail
self.assertRaises(VerificationFail, self._callFUT, options)
self.assertNotIn('falling back to a full recover.',
sys.stderr.getvalue())
self.assertTrue(os.path.exists(output + '.part'))

def test_w_incr_backup_with_verify_size_inconsistent_too_small(self):
Expand All @@ -1110,6 +1115,8 @@ def test_w_incr_backup_with_verify_size_inconsistent_too_small(self):
'/backup/2010-05-14-08-09-10.deltafs 9 12 45054f47ac3305a2a33e9bcceadff712\n') # noqa: E501 line too long
from ZODB.scripts.repozo import VerificationFail
self.assertRaises(VerificationFail, self._callFUT, options)
self.assertNotIn('falling back to a full recover.',
sys.stderr.getvalue())
self.assertTrue(os.path.exists(output + '.part'))

def test_w_incr_backup_with_verify_size_inconsistent_too_big(self):
Expand All @@ -1130,6 +1137,8 @@ def test_w_incr_backup_with_verify_size_inconsistent_too_big(self):
'/backup/2010-05-14-08-09-10.deltafs 9 12 45054f47ac3305a2a33e9bcceadff712\n') # noqa: E501 line too long
from ZODB.scripts.repozo import VerificationFail
self.assertRaises(VerificationFail, self._callFUT, options)
self.assertNotIn('falling back to a full recover.',
sys.stderr.getvalue())
self.assertTrue(os.path.exists(output + '.part'))

def test_w_inc_backup_switch_auto_to_full_recover_if_output_larger_than_dat(self): # noqa: E501 line too long
Expand Down

0 comments on commit acadc7a

Please sign in to comment.