commit melhorias sgf
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
$book=$argv[1]??'regression';require __DIR__.'/sgf-single-bootstrap.php';
|
||||
$p=App\Shared\Installation\SyntheticProfiles::policy();
|
||||
$beforeUsers=$host->table('users')->orderBy('id')->get()->toJson();$beforeClients=$host->table('a_clients')->orderBy('id')->get()->toJson();
|
||||
file_put_contents($work.'/before-users-private.json',$beforeUsers);
|
||||
$result=(new App\Shared\Installation\SyntheticProfiles)->install();
|
||||
if($beforeClients!==$host->table('a_clients')->orderBy('id')->get()->toJson())throw new LogicException('Client preservation failed');
|
||||
file_put_contents($s['root'].'/single-profiles.json',json_encode($result,JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));
|
||||
file_put_contents($work.'/profiles-result.json',json_encode(['passed'=>true,'profiles'=>$result['profiles'],'replayed'=>$result['replayed'],'source_hash'=>$result['source_hash'],'old_clients_preserved'=>true,'real_access'=>false,'new_database_roles'=>0],JSON_PRETTY_PRINT|JSON_THROW_ON_ERROR));
|
||||
echo json_encode(['passed'=>true,'book'=>$book,'profiles'=>count($result['profiles']),'replayed'=>$result['replayed'],'proof'=>$work.'/profiles-result.json']).PHP_EOL;
|
||||
Reference in New Issue
Block a user