fix(packaging): keep distribution minimal
This commit is contained in:
1 parent
c97e4edc74
commit
b74baef555
18 files changed
+492
-49
No files matched your search
@@ -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
|
||||
Reference in new issue
Block a user