build(installer): AppMutex + CloseApplications pour MAJ en place (D8)
Synchronise l'installeur GUI avec gui_v6/single_instance.py:APP_MUTEX_NAME afin que Inno Setup ferme l'application avant de remplacer l'EXE lors d'une mise à jour en place (AppId fixe). Test anti-dérive dynamique inclus. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
27
tests/unit/test_installer_iss_d8.py
Normal file
27
tests/unit/test_installer_iss_d8.py
Normal file
@@ -0,0 +1,27 @@
|
||||
"""Anti-dérive D8 (Plan 3) : l'installeur GUI doit fermer l'app avant MAJ.
|
||||
|
||||
AppMutex DOIT valoir gui_v6.single_instance.APP_MUTEX_NAME (P0-7) — le commentaire
|
||||
de single_instance.py:15 exige la synchro. CloseApplications ferme l'app qui
|
||||
verrouille l'EXE pendant l'upgrade en place (AppId fixe).
|
||||
"""
|
||||
from pathlib import Path
|
||||
|
||||
from gui_v6.single_instance import APP_MUTEX_NAME
|
||||
|
||||
ISS = Path(__file__).resolve().parents[2] / "installer" / "Anonymisation.iss"
|
||||
|
||||
|
||||
def test_appmutex_synchronise_avec_single_instance():
|
||||
text = ISS.read_text(encoding="utf-8")
|
||||
assert f"AppMutex={APP_MUTEX_NAME}" in text
|
||||
|
||||
|
||||
def test_closeapplications_actif():
|
||||
text = ISS.read_text(encoding="utf-8")
|
||||
assert "CloseApplications=yes" in text
|
||||
|
||||
|
||||
def test_appid_fixe_inchange():
|
||||
# L'upgrade en place repose sur l'AppId stable — ne jamais le régénérer.
|
||||
text = ISS.read_text(encoding="utf-8")
|
||||
assert "AppId={{6D11E4F8-26D8-4CFB-9F19-5A81E0637F56}" in text
|
||||
Reference in New Issue
Block a user