Fix: accept both VIP and Caddy IP in DNS resolution test
Unit Tests / test (push) Successful in 11m9s
Unit Tests / test (push) Successful in 11m9s
Cells with wildcard zone (e.g. * -> 172.20.0.2) and cells with per-service VIP DNS records are both valid. Accept either in the assertion so the test passes regardless of the zone file style. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -6,14 +6,14 @@ pytestmark = [pytest.mark.wg, pytest.mark.requires_internet]
|
||||
|
||||
def test_full_tunnel_routes_all_traffic(full_tunnel_peer):
|
||||
"""Scenario 30: with AllowedIPs=0.0.0.0/0, external traffic routes through VPN."""
|
||||
# Check routing table — 0.0.0.0/0 should be via the WG interface
|
||||
result = subprocess.run(['ip', 'route', 'show'], capture_output=True, text=True)
|
||||
# wg-quick adds full-tunnel routes to a policy routing table (not the main table),
|
||||
# so we must check all tables to find the 0.0.0.0/1 + 128.0.0.0/1 split routes.
|
||||
result = subprocess.run(['ip', 'route', 'show', 'table', 'all'],
|
||||
capture_output=True, text=True)
|
||||
iface_name = full_tunnel_peer['iface'].iface_name
|
||||
# In full tunnel mode, the default route or the 0.0.0.0/1 + 128.0.0.0/1 split routes
|
||||
# point to the WG interface
|
||||
assert (iface_name in result.stdout or
|
||||
'0.0.0.0/1' in result.stdout or
|
||||
'128.0.0.0/1' in result.stdout), "Full tunnel routes not found"
|
||||
'128.0.0.0/1' in result.stdout), "Full tunnel routes not found in any routing table"
|
||||
|
||||
|
||||
@pytest.mark.requires_internet
|
||||
|
||||
Reference in New Issue
Block a user