fix(tests): send the over-limit Content-Length without a body in the 413 test
test_a_body_beyond_the_hub_wide_limit_answers_413_and_stores_nothing sent a real 1 MiB + 1 body. The hub answers 413 on the header and closes without reading the body, so under load the client hit BrokenPipeError while still sending; that made the gate on 67cbe0d red. The test now sends the oversized Content-Length with an empty body, as the other 413 tests do.
🎯 Fix: 93 %
💥 Break: 1 %
💸 Tokens: –
⏱️ Velocity: –
🛡️ Security: 100 %
🏆 Score: 92
🚦 Gate: ✅ 90/5, tokens and velocity <= 100, security 100 %
Created-with: https://s.veen.world/skills
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
67cbe0ddd3
commit
3d4d9a9929
1 file changed
+1
-1
@@ -686,7 +686,7 @@ class TestHubView(HubCase):
|
||||
self.assertEqual(self.view()["resources"]["combinedHidden"], [])
|
||||
|
||||
def test_a_body_beyond_the_hub_wide_limit_answers_413_and_stores_nothing(self):
|
||||
status, _, answer = self.call("PATCH", "/api/view", b" " * (BODY_LIMIT + 1), {**self.guard(self.host), "Content-Type": "application/json"})
|
||||
status, _, answer = self.call("PATCH", "/api/view", b"", {**self.guard(self.host), "Content-Type": "application/json", "Content-Length": str(BODY_LIMIT + 1)})
|
||||
self.assertEqual(status, 413, answer)
|
||||
self.assertFalse((self.state / "view.json").exists())
|
||||
|
||||
|
||||
Reference in new issue
Block a user