mirror of
https://github.com/borgbackup/borg.git
synced 2025-01-03 05:35:58 +00:00
Merge pull request #5204 from ThomasWaldmann/fix-sporadic-test_delete_force-failure-master
test_delete_force: avoid sporadic test setup issues, fixes #5196
This commit is contained in:
commit
47b1c47459
1 changed files with 5 additions and 4 deletions
|
@ -1489,11 +1489,12 @@ def test_delete_force(self):
|
||||||
manifest, key = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
manifest, key = Manifest.load(repository, Manifest.NO_OPERATION_CHECK)
|
||||||
archive = Archive(repository, key, manifest, 'test')
|
archive = Archive(repository, key, manifest, 'test')
|
||||||
for item in archive.iter_items():
|
for item in archive.iter_items():
|
||||||
if 'chunks' in item:
|
if item.path.endswith('testsuite/archiver.py'):
|
||||||
first_chunk_id = item.chunks[0].id
|
repository.delete(item.chunks[-1].id)
|
||||||
repository.delete(first_chunk_id)
|
|
||||||
repository.commit(compact=False)
|
|
||||||
break
|
break
|
||||||
|
else:
|
||||||
|
assert False # missed the file
|
||||||
|
repository.commit(compact=False)
|
||||||
output = self.cmd('delete', '--force', self.repository_location + '::test')
|
output = self.cmd('delete', '--force', self.repository_location + '::test')
|
||||||
self.assert_in('deleted archive was corrupted', output)
|
self.assert_in('deleted archive was corrupted', output)
|
||||||
self.cmd('check', '--repair', self.repository_location)
|
self.cmd('check', '--repair', self.repository_location)
|
||||||
|
|
Loading…
Reference in a new issue