perf: replace automatic backups with manual backup reminders
This commit is contained in:
1 parent
7527800128
commit
c85696080d
26 files changed
+385
-102
No files matched your search
@@ -56,7 +56,8 @@ def test_restore_checks_source_in_library_copy_then_opens_actual_target(recovery
|
||||
retained = list(original.parent.parent.glob('Work.before-restore-*'))
|
||||
assert len(retained) == 1
|
||||
assert (retained[0]/'database/icdb.dat').read_bytes() == b'damaged'
|
||||
assert list(request.evidence_dir.rglob('library-before/target.lmc'))
|
||||
assert not list(request.evidence_dir.rglob('library-before'))
|
||||
assert not list(request.evidence_dir.rglob('source-before'))
|
||||
|
||||
|
||||
def test_invalid_source_does_not_touch_target(recovery_files):
|
||||
@@ -208,14 +209,15 @@ def test_logs_and_unrelated_cbb_changes_after_snapshot_do_not_block_install(reco
|
||||
assert len(calls) == 2
|
||||
assert (original.parent/'database/icdb.dat').read_bytes() == b'healthy'
|
||||
assert (other.parent/'database/icdb.dat').read_bytes() == b'unrelated update'
|
||||
assert list(request.evidence_dir.rglob('source-before/session.log'))[0].read_bytes() == b'snapshot log'
|
||||
staged = calls[0].lmc_file.parent/'ReusableBlocksLP/A/Work'
|
||||
assert (staged/'session.log').read_bytes() == b'snapshot log'
|
||||
|
||||
|
||||
@pytest.mark.parametrize('location,change', [
|
||||
('source', 'edit'), ('source', 'delete'), ('source', 'add'),
|
||||
('target', 'delete'), ('target', 'add'), ('cert', 'edit'), ('shared', 'edit'),
|
||||
])
|
||||
def test_primary_conflicts_preserve_target_and_complete_recovery_copies(recovery_files, location, change):
|
||||
def test_primary_conflicts_preserve_target_and_validation_evidence(recovery_files, location, change):
|
||||
from cbb_refresh_verify.backup_recovery import recover_from_backup
|
||||
request, original, source = recovery_files
|
||||
if location == 'source':
|
||||
@@ -244,8 +246,10 @@ def test_primary_conflicts_preserve_target_and_complete_recovery_copies(recovery
|
||||
assert len(calls) == 1
|
||||
assert (original.parent/'database/icdb.dat').read_bytes() == b'damaged'
|
||||
assert not list(original.parent.parent.glob('Work.before-restore-*'))
|
||||
assert list(request.evidence_dir.rglob('library-before/target.lmc'))
|
||||
assert list(request.evidence_dir.rglob('source-before/database/icdb.dat'))
|
||||
assert list(request.evidence_dir.rglob('library-baseline-manifest.json'))
|
||||
assert list(request.evidence_dir.rglob('source-manifest.json'))
|
||||
assert calls[0][0].lmc_file.is_file()
|
||||
assert not list(request.evidence_dir.rglob('library-before'))
|
||||
|
||||
|
||||
def test_source_conflict_while_preparing_incoming_work_blocks_install(recovery_files, monkeypatch):
|
||||
|
||||
Reference in new issue
Block a user