3 lines
1.4 KiB
PHP
3 lines
1.4 KiB
PHP
<?php
|
|
$p=new PDO('pgsql:host=127.0.0.1;port=55441;dbname=stability_consumers_20261011_084534_test','postgres','',[PDO::ATTR_ERRMODE=>PDO::ERRMODE_EXCEPTION]);$p->exec('BEGIN READ ONLY');try{$r=$p->query("select r.id,r.case_id,r.status,r.protocol,s.code,s.version,s.id as service_version_id from desk_requests r join desk_service_versions s on s.id=r.service_version_id where r.case_id='b3e162da-0f9e-4ed4-8e66-c1febcb8504b'")->fetchAll(PDO::FETCH_ASSOC);if(count($r)!==1||$r[0]['id']!=='2ead554a-bcf0-4865-8936-41311ce7d6a0'||$r[0]['status']!=='draft'||$r[0]['code']!=='project-preparation'||(int)$r[0]['version']!==3)throw new RuntimeException('Unexpected draft or service');$v=['at'=>gmdate('c'),'result'=>'passed','target'=>'stability_consumers_20261011_084534_test:55441','SQL_read_only'=>true,'requests'=>$r,'request_count_for_case'=>1,'service_resolved_locally'=>true,'destination_service_ID_imported'=>false,'new_dossiers'=>0,'new_support_drafts'=>1,'support_submitted'=>false,'content_imports'=>0,'content_publications'=>0,'active_changes'=>0,'browser_observed'=>['anonymous article','login only when continuing','existing dossier and article context recovered','support preparation opened draft with return to same dossier'],'B_reopened'=>false];file_put_contents(__DIR__.'/RESULTADO-PERCURSO-INSTALADO-QA.json',json_encode($v,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));echo json_encode($v);}finally{$p->exec('ROLLBACK');}
|