fix(test-schemathesis): disable rate limiter in fuzz subprocess
Schemathesis fires up to 3000 examples per endpoint. POST /auth/login caps at 10/5min per IP, so the second example onward returns 429 and the positive_data_acceptance check flags it as RejectedPositiveData (its allowed-status list is hardcoded in schemathesis to 2xx/401/403/404/409/5xx, so OpenAPI tweaks can't fix it). DECNET_LIMITER_ENABLED=false exists for exactly this case (see limiter.py docstring on stress/load testing). Reverts the custom_openapi shim from5d88346/9b1168c— the endpoint already declares 429 in its responses= map (api_login.py:38), and the shim turned out to address a problem that wasn't there. Drop the companion test along with it.
This commit is contained in:
@@ -94,6 +94,12 @@ def start_automated_server() -> subprocess.Popen:
|
||||
env["DECNET_DEVELOPER"] = "true"
|
||||
env["DECNET_CONTRACT_TEST"] = "true"
|
||||
env["DECNET_JWT_SECRET"] = TEST_SECRET
|
||||
# Schemathesis fires thousands of examples per endpoint; the login
|
||||
# bucket (10/5min per IP) trips on the second example and turns
|
||||
# every subsequent valid request into a RejectedPositiveData
|
||||
# failure. Disable the limiter for the fuzz subprocess — same
|
||||
# rationale as the load-testing knob in decnet/web/limiter.py.
|
||||
env["DECNET_LIMITER_ENABLED"] = "false"
|
||||
|
||||
log_dir = Path(__file__).parent.parent.parent / "logs"
|
||||
log_dir.mkdir(exist_ok=True)
|
||||
|
||||
Reference in New Issue
Block a user