validation avant release : test casse par (74), trois defauts d outillage
test_restauration fournit client_backup_attente_verrou et exige --retry-lock ; test_frontiere_refus lit le WAN sous if_wan ; prouver --verifier nomme les preuves en echec ; le Makefile n exporte plus une liste de cles de voute vide (valeur identique sur le poste). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
5d7d2a8918
commit
f42d30b38a
5 changed files with 56 additions and 3 deletions
|
|
@ -28,8 +28,11 @@ def main() -> int:
|
|||
if r.returncode != 0 or not r.stdout.strip().startswith("{"):
|
||||
print("SAUTE le devis de la frontiere ne se genere pas ici (site invisible)")
|
||||
return 0
|
||||
regles = json.loads(r.stdout).get("regles") or []
|
||||
wan = str((json.loads(r.stdout).get("interfaces") or {}).get("wan") or "wan")
|
||||
devis = json.loads(r.stdout)
|
||||
regles = devis.get("regles") or []
|
||||
# `if_wan`, la cle que le devis produit. Le test lisait `interfaces.wan`, qui n'existe
|
||||
# pas : il retombait sur « wan », juste au site par chance, faux sur le modele public.
|
||||
wan = str(devis.get("if_wan") or "wan")
|
||||
echecs = []
|
||||
refus = [x for x in regles if x.get("action") == "reject"]
|
||||
if any(x.get("interface") == wan for x in refus):
|
||||
|
|
|
|||
|
|
@ -130,6 +130,9 @@ def outil() -> None:
|
|||
# SETOPS_TEST_DEPOT_ABSENT=1 imite restic 0.17+ face a un depot inexistant (code 10).
|
||||
executable(bin_ / "restic", f"""#!/bin/bash
|
||||
if [[ -n "${{SETOPS_TEST_DEPOT_ABSENT:-}}" ]]; then exit 10; fi
|
||||
# L'outil passe `--retry-lock <duree>` avant la sous-commande (74) : on l'exige, puis on le saute.
|
||||
[[ "$1" == --retry-lock && -n "$2" ]] || {{ echo "restic appele sans --retry-lock : $*" >&2; exit 99; }}
|
||||
shift 2
|
||||
case "$1" in
|
||||
snapshots) cat "{d}/snapshots.json" ;;
|
||||
restore)
|
||||
|
|
@ -164,6 +167,7 @@ if (( ! avec_c )); then cat > "{log}/section.sql"; fi
|
|||
client_backup_restauration_mise_de_cote=str(d / "mis-de-cote"),
|
||||
client_backup_staging=str(staging),
|
||||
client_backup_jobs=[{"nom": "courriel"}, {"nom": "postgresql"}],
|
||||
client_backup_attente_verrou="30m",
|
||||
).replace("/etc/ssh/ssh_host_ed25519_key.pub", str(cle)) \
|
||||
.replace("/etc/setops/restic.pass", str(d / "restic.pass"))
|
||||
script = d / "setops-restaurer"
|
||||
|
|
|
|||
Loading…
Reference in a new issue