Реализация на 5
Application HTTPS smoke / application (pull_request) Canceled after 0s
Skeleton contracts / contracts (pull_request) Canceled after 0s

This commit is contained in:
Grbisba
2026-11-18 11:36:21 +03:00
parent 20afc2c790
commit de4d471d80
255 changed files with 21516 additions and 124 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/usr/bin/env python3
import json,subprocess,sys
from pathlib import Path
root=Path(__file__).resolve().parents[1];path=root/'evidence/restart-evidence.json'
phase=sys.argv[1];out={}
for cid in subprocess.check_output([str(root/'scripts/compose.sh'),'ps','-q'],text=True).split():
c=json.loads(subprocess.check_output(['docker','inspect',cid],text=True))[0]
out[c['Name']]={'id':c['Id'],'started_at':c['State']['StartedAt'],'volumes':[{'name':m.get('Name'),'destination':m['Destination']} for m in c['Mounts'] if m['Type']=='volume']}
data=json.loads(path.read_text()) if phase=='after' and path.exists() else {};data[phase]=out
if phase=='after':
required=['postgres','redis','broker','s3','openbao','prometheus','loki','tempo','grafana']
data['all_stores_restarted']=all(any('-'+role+'-' in name and value['started_at']!=data['before'].get(name,{}).get('started_at') for name,value in out.items()) for role in required)
assert data['all_stores_restarted']
path.write_text(json.dumps(data,indent=2)+'\n')