fix(packaging): keep distribution minimal

This commit is contained in:
Your Name committed 2026-06-18 11:14:04 +08:00
1 parent c97e4edc74
commit b74baef555
18 files changed
+492 -49

No files matched your search

+27
View File
@@ -286,3 +286,30 @@ def test_startup_update_fail_closed_blocks_old_client(tmp_path, monkeypatch):
)
assert exc.value.code == 3
def test_early_bootstrap_fail_closed_blocks_if_updater_crashes(monkeypatch):
from douyin.updater import bootstrap
from douyin.updater.force_update import UpdateSettings
monkeypatch.setattr(
bootstrap,
"load_update_settings",
lambda: UpdateSettings(
enabled=True,
manifest_url="https://example.test/update.json",
download_dir=Path("updates"),
fail_closed=True,
),
)
def crash(*, app_name: str):
raise RuntimeError("broken updater import")
with pytest.raises(SystemExit) as exc:
bootstrap.run_startup_update_check_early(
app_name="test_app",
update_check=crash,
)
assert exc.value.code == 3