10 lines
1.4 KiB
Python
10 lines
1.4 KiB
Python
from http_common import *
|
|
final=json.loads((out/'FINAL-QA.json').read_text('utf-8'));s=login('installer');p=call(s,'/management/investment/zones/operational-install')['plan']
|
|
check('final_candidate_authenticated_preview_installed_exact_code',p['installed']and p['ready']and p['code_hash']==final['code_hash'])
|
|
state=json.loads((out/'L1-STATE-C.json').read_text('utf-8'));manager=login('manager');r=call(manager,'/api/v2/investment/admin/zones/'+state['zone'])['record'];pub=call(session(),'/api/v2/investment/zones/'+state['zone'])
|
|
check('final_new_session_recovers_private_T2',r['operational_details']['review']['private_note']=='L1-REVISAO-PRIVADA-T2-FINAL'and float(r['operational_details']['conditions'][0]['value'])==325.25)
|
|
check('final_candidate_public_response_unchanged_after_reversal',pub==state['public'])
|
|
text=json.dumps(pub,ensure_ascii=False);check('final_public_no_private_ciphertext_contact_notes_or_support',all(x not in text for x in ['L1-CONTACTO-PESSOAL-PRIVADO','L1-NOTA-PRIVADA','L1-REVISAO-PRIVADA-T2-FINAL','private_ciphertext','support_document_ids','325.25']))
|
|
(out/'INSTALADOR-FINAL-QA.json').write_text(json.dumps({'candidate':final['candidate'],'plan':p,'preview_only':True,'fresh_installation_repeated':False},ensure_ascii=False,indent=2),'utf-8')
|
|
print(json.dumps({'checks':len(proof['checks']),'events':len(proof['events']),'final_code_hash':p['code_hash']}))
|