@@ -217,6 +217,23 @@ test('legal contention and recovery require original source publication and froz
|
||||
expect(landedQaReceiptsVerified($command, $encode($rows)))->toBeFalse();
|
||||
});
|
||||
|
||||
test('documentary reference HTTP receipts require the exact edition full draft count and native preservation', function () {
|
||||
$command = ['php', 'worker.php', 'compras_receipts_test_000000000001', 'legal-reference-http'];
|
||||
$row = ['native_legal_http_login' => true, 'csrf_required' => true, 'large_multipart_upload_bytes' => 1002011,
|
||||
'original_sha256' => 'a0110696253715567af39c159a21bacfebc32f944fa43a4efd18070d36959e50', 'documentary_reference_drafts' => 48,
|
||||
'original_unchanged' => true, 'exact_native_download' => true, 'one_source_one_audit_after_replay' => true,
|
||||
'guest_status' => 401, 'revoked_status' => 403, 'rules_published' => 0, 'financial_stock_unchanged' => true,
|
||||
'global_php_config_unchanged' => true, 'private_http_server_stopped' => true, 'private_http_root_removed' => true];
|
||||
expect(landedQaReceiptsVerified($command, json_encode($row, JSON_THROW_ON_ERROR)))->toBeTrue();
|
||||
foreach (['original_sha256', 'documentary_reference_drafts', 'financial_stock_unchanged', 'rules_published', 'private_http_root_removed'] as $field) {
|
||||
$incomplete = $row;
|
||||
unset($incomplete[$field]);
|
||||
expect(landedQaReceiptsVerified($command, json_encode($incomplete, JSON_THROW_ON_ERROR)))->toBeFalse();
|
||||
}
|
||||
$command[3] = 'legal-http';
|
||||
expect(landedQaReceiptsVerified($command, json_encode($row, JSON_THROW_ON_ERROR)))->toBeFalse();
|
||||
});
|
||||
|
||||
test('real corpus receipts require hashes verified native originals and no rule publication', function () {
|
||||
$command = ['php', 'worker.php', 'compras_receipts_test_000000000001', 'corpus'];
|
||||
$row = ['shared_corpus_files_inventoried' => 4, 'inventory_metadata_sha256' => str_repeat('a', 64),
|
||||
|
||||
Reference in New Issue
Block a user