test: fix templates paths, CLI gating, and stress-suite harness
- tests/**: update templates/ → decnet/templates/ paths after module move - tests/mysql_spinup.sh: use root:root and asyncmy driver - tests/test_auto_spawn.py: patch decnet.cli.utils._pid_dir (package split) - tests/test_cli.py: set DECNET_MODE=master in api-command tests - tests/stress/conftest.py: run locust out-of-process via its CLI + CSV stats shim to avoid urllib3 RecursionError from late gevent monkey-patch; raise uvicorn startup timeout to 60s, accept 401 from auth-gated health, strip inherited DECNET_* env, surface stderr on 0-request runs - tests/stress/test_stress.py: loosen baseline thresholds to match hw
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
"""
|
||||
Tests for templates/mqtt/server.py — protocol boundary and fuzz cases.
|
||||
Tests for decnet/templates/mqtt/server.py — protocol boundary and fuzz cases.
|
||||
|
||||
Focuses on the variable-length remaining-length field (MQTT spec: max 4 bytes).
|
||||
A 5th continuation byte used to cause the server to get stuck waiting for a
|
||||
@@ -25,7 +25,7 @@ def _load_mqtt():
|
||||
if key in ("mqtt_server", "syslog_bridge"):
|
||||
del sys.modules[key]
|
||||
sys.modules["syslog_bridge"] = make_fake_syslog_bridge()
|
||||
spec = importlib.util.spec_from_file_location("mqtt_server", "templates/mqtt/server.py")
|
||||
spec = importlib.util.spec_from_file_location("mqtt_server", "decnet/templates/mqtt/server.py")
|
||||
mod = importlib.util.module_from_spec(spec)
|
||||
with patch.dict("os.environ", {"MQTT_ACCEPT_ALL": "1", "MQTT_PERSONA": "water_plant"}, clear=False):
|
||||
spec.loader.exec_module(mod)
|
||||
|
||||
Reference in New Issue
Block a user