File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -757,3 +757,23 @@ def test_timeago_fuzz(seconds):
757757 """Fuzz _timeago to ensure it works with any integer"""
758758 val = _timeago (seconds )
759759 assert re .match (r"(now|\d+ (secs?|mins?|hours?|days?|months?|years?))" , val )
760+
761+
762+ @pytest .mark .unit
763+ @pytest .mark .usefixtures ("reset_mt_config" )
764+ def test_onResponseTraceRoute_routing_error (capsys ):
765+ """Test that onResponseTraceRoute handles ROUTING_APP error packets correctly."""
766+ iface = MeshInterface (noProto = True )
767+
768+ packet = {
769+ "decoded" : {
770+ "portnum" : "ROUTING_APP" ,
771+ "routing" : {"errorReason" : "MAX_RETRANSMIT" },
772+ }
773+ }
774+
775+ iface .onResponseTraceRoute (packet )
776+
777+ assert iface ._acknowledgment .receivedTraceRoute is True
778+ out , _ = capsys .readouterr ()
779+ assert "Traceroute failed: MAX_RETRANSMIT" in out
You can’t perform that action at this time.
0 commit comments