fix: validate library and data paths at the application boundary

This commit is contained in:
阿白叔 committed 2026-11-23 18:06:17 +08:00
1 parent 47c2cfecc6
commit 6d2b6de027
10 files changed
+336 -36

No files matched your search

+1
View File
@@ -166,6 +166,7 @@ def test_cli_unsafe_batch_preserves_created_drive(tmp_path, monkeypatch):
from cbb_refresh_verify import application
backend = FakeWNet()
lease = LibraryPathLease.acquire(r'\\server\share\lib.lmc', backend=backend)
(tmp_path/'lib.lmc').write_bytes(b'library')
monkeypatch.setattr(LibraryPathLease, 'acquire', lambda path: lease)
monkeypatch.setattr('cbb_refresh_verify.network_path.select_library_file', lambda path: tmp_path/'lib.lmc')
monkeypatch.setattr('cbb_refresh_verify.verify_runner.run_batch', lambda requests, **kw: [VerifyResult('FAIL', safe_to_continue=False)])