From 3c8b130be89fbb0e58e2ee23f07ad56a3b9de2e7 Mon Sep 17 00:00:00 2001 From: Andrew Guschin Date: Fri, 30 Oct 2026 05:15:56 +0400 Subject: Reject streamed diagnostic error documents and record VM qualification --- tests/vm_diagnostics_acceptance.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tests/vm_diagnostics_acceptance.py') diff --git a/tests/vm_diagnostics_acceptance.py b/tests/vm_diagnostics_acceptance.py index 1984585..001f1a3 100644 --- a/tests/vm_diagnostics_acceptance.py +++ b/tests/vm_diagnostics_acceptance.py @@ -75,9 +75,14 @@ def main(binary): self.send_response(206); self.end_headers(); self.wfile.write(b'partial'); return self.send_response(200) if self.path == '/error': self.send_header('Content-Type', 'application/problem+json') - if self.path == '/json-error': self.send_header('Content-Type', 'application/json') + if self.path in ['/json-error', '/long-error', '/late-error', '/escaped-error', '/json-data']: self.send_header('Content-Type', 'application/json') body = b'' if self.path in ['/error', '/json-error']: body = b'{"error":"fixture-provider-error"}' + if self.path == '/long-error': body = json.dumps({'error':'x'*30000}).encode() + if self.path == '/late-error': body = json.dumps({'metadata':'x'*30000, 'error':'provider failure'}).encode() + if self.path == '/escaped-error': body = b'{"\\u0065rror":"' + b'x'*20000 + b'"}' + if self.path == '/json-data': body = json.dumps({'data':{'error':'nested payload'},'metadata':'x'*30000 + '"error":not a field', 'error':None,'errors':[]}).encode() + if self.path == '/late-html': body = b' ' * 30000 + b'provider error' if self.path == '/html': body = b'unexpected page' if self.path == '/oversize': body = b'x' * 4097 if self.path == '/large': body = b'x' * (8 * 1048576) -- cgit v1.2.3