fix: diagnostics tab — run ping/traceroute in cell-wireguard, fix wrong method call
The connectivity endpoint was calling routing_manager.test_connectivity() (no args, internal health check) instead of test_routing_connectivity(target_ip). Also ping/traceroute aren't installed in the API container; run them via docker exec cell-wireguard instead. Updated test_api_endpoints to mock test_routing_connectivity and cover the new DELETE /firewall/<id> and GET /live-iptables endpoints. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+4
-2
@@ -1638,8 +1638,10 @@ def get_live_iptables():
|
||||
def test_routing_connectivity():
|
||||
"""Test routing connectivity."""
|
||||
try:
|
||||
data = request.get_json(silent=True)
|
||||
result = routing_manager.test_connectivity(data)
|
||||
data = request.get_json(silent=True) or {}
|
||||
target_ip = data.get('target_ip', '8.8.8.8')
|
||||
via_peer = data.get('via_peer')
|
||||
result = routing_manager.test_routing_connectivity(target_ip, via_peer)
|
||||
return jsonify(result)
|
||||
except Exception as e:
|
||||
logger.error(f"Error testing routing connectivity: {e}")
|
||||
|
||||
Reference in New Issue
Block a user