diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-10-17 18:51:35 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-10-17 18:51:35 +0200 |
| commit | 7e01b7e8c2ce2ef9fce8b6c053c3b7210b64f9bf (patch) | |
| tree | 9b5d0aae04e226e1f3c7187a4866ee421544f7a4 /packages/meshbay-hub/tests/test_search_fanout.py | |
| parent | 8125df6d8149368ed8a84c9db6c5e37bfccb5a15 (diff) | |
| download | meshbay-7e01b7e8c2ce2ef9fce8b6c053c3b7210b64f9bf.tar.gz | |
fix(spa): search names the groups refused the local network
Search gives up before ICE does, so the refusal is read from the
connection then; the walk moves on to the group's other nodes, and the
page lists the refused groups with a link to each.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-hub/tests/test_search_fanout.py')
| -rw-r--r-- | packages/meshbay-hub/tests/test_search_fanout.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/packages/meshbay-hub/tests/test_search_fanout.py b/packages/meshbay-hub/tests/test_search_fanout.py index 23a8b67d..73ba4ac0 100644 --- a/packages/meshbay-hub/tests/test_search_fanout.py +++ b/packages/meshbay-hub/tests/test_search_fanout.py @@ -50,7 +50,7 @@ import subprocess from pathlib import Path import pytest -from spa_source import search_argv +from spa_source import search_argv, search_source STATIC = Path(__file__).resolve().parents[1] / "src" / "meshbay_hub" / "static" SEARCH_PAGE = STATIC / "search-page.js" @@ -174,3 +174,18 @@ def test_no_more_groups_are_dialled_at_once_than_the_ceiling(): out = _sweep(groups=12, dead=list(range(12))) assert out["inFlight"] == 6 assert out["finishedAt"] == 2 * DEAD_MS + + +def test_a_group_refused_the_local_network_is_named_apart(): + """Not "unreachable": the page names these groups and says what to change, + and they are dialled last next time like any group that did not answer.""" + out = _sweep(groups=4, dead=[1, 2], lanRefused=[2]) + assert out["outcome"] == {"unreachable": ["G1"], "lanBlocked": ["G2"]}, out + assert sorted(out["remembered"]) == ["g-1", "g-2"], out + + +def test_the_search_page_shows_the_refused_groups_with_a_way_in(): + source = search_source() + start = source.index("lanBlocked.length > 0") + hint = source[start:start + 400] + assert "t('search.lan_blocked'" in hint and "groupLinkRoute(g)" in hint |