Context
The hello → config → telemetry handshake has never been exercised end to end. The Radxa host does not exist yet, so a Python test harness that plays host against the real device is both the test rig for #3 and the executable contract for #11 — whatever MAC format and role names the harness uses becomes the spec the real provisioning service must match.
Scope
A pytest + paho-mqtt suite (suggested location: host/tests/) run against the Mosquitto broker with a real ESP32 on the bench.
Scenarios
- Device boots unconfigured → hello appears on
repacss/devices/<mac>/hello within HELLO_INTERVAL_MS, payload is valid JSON with the right MAC
- Harness publishes a valid config → hello stops, telemetry starts on the assigned topic (
configured && enabled gate opens)
- Invalid / malformed config → telemetry stays off, device keeps helloing
- Retained config + device reboot → config arrives immediately on subscribe (verifies subscribe-before-hello ordering for real)
- Config payload larger than the 1024-byte MQTT buffer → dropped, device unaffected
- Broker restart → device reconnects and re-subscribes, config delivery still works
Acceptance criteria
Relates to #3, #11.
Context
The hello → config → telemetry handshake has never been exercised end to end. The Radxa host does not exist yet, so a Python test harness that plays host against the real device is both the test rig for #3 and the executable contract for #11 — whatever MAC format and role names the harness uses becomes the spec the real provisioning service must match.
Scope
A pytest + paho-mqtt suite (suggested location:
host/tests/) run against the Mosquitto broker with a real ESP32 on the bench.Scenarios
repacss/devices/<mac>/hellowithinHELLO_INTERVAL_MS, payload is valid JSON with the right MACconfigured && enabledgate opens)Acceptance criteria
Relates to #3, #11.