10 lines
1.2 KiB
Python
10 lines
1.2 KiB
Python
from http_common import *
|
|
s=login('installer');base='/management/investor-context-installation';p=call(s,base);check('final_exact_candidate_installer_preview',p['installed']and p['consistent']and p['ready'])
|
|
call(s,base,{'hash':'0'*64,'operation_key':str(uuid.uuid4()),'confirm':True},expected=409)
|
|
call(s,base,{'hash':p['hash'],'operation_key':str(uuid.uuid4()),'confirm':True,'migration':'other'},expected=422)
|
|
key=str(uuid.uuid4());body={'hash':p['hash'],'operation_key':key,'confirm':True};r=call(s,base,body);check('final_candidate_install_only_absent_nominal_migration',not r['changed']and r['business_records_changed']==0)
|
|
check('final_installer_replay_idempotent',call(s,base,body)['replayed'])
|
|
outsider=session('outsider');call(outsider,base,expected=403);call(outsider,base,body,expected=403)
|
|
check('unprivileged_installer_refused',True)
|
|
(out/'FINAL-INSTALLER-RECEIPT.json').write_text(json.dumps({'preview':p,'receipt':r,'operation_key':key,'initial_installation_evidence':'INSTALLATION-RECEIPT.json','only_migration':'2026_10_16_150000_create_investor_navigation_preferences','active_changes':0},ensure_ascii=False,indent=2)+'\n','utf-8');print('Final candidate authenticated installer preview, negative cases, no-op and replay passed')
|