aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-10-11 21:17:09 +0200
committerChristophe Besson <cbesson@gmail.com>2026-10-11 21:17:09 +0200
commit1667fdcb1a621296eefc5ed90d846c1f77715c76 (patch)
tree3626f1dd5a6281473dea4f59382d107251ca4d40 /packages/meshbay-node/tests
parent2ef0c215ea4af421a4b22ab543a5999320998f68 (diff)
downloadmeshbay-1667fdcb1a621296eefc5ed90d846c1f77715c76.tar.gz
fix(node): tell the Node page how many cores there are
The page reads its settings from list_groups, which lacked cpu_count, so the field showed "of 1" and stayed at 1. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests')
-rw-r--r--packages/meshbay-node/tests/test_connection_processes.py11
1 files changed, 11 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_connection_processes.py b/packages/meshbay-node/tests/test_connection_processes.py
index 5eea9b9..47aded0 100644
--- a/packages/meshbay-node/tests/test_connection_processes.py
+++ b/packages/meshbay-node/tests/test_connection_processes.py
@@ -272,6 +272,17 @@ async def test_the_setting_is_applied_now_and_kept(state, monkeypatch):
@pytest.mark.asyncio
+async def test_the_node_page_is_told_how_many_cores_there_are(state, monkeypatch):
+ """The page takes its settings from `list_groups`. It was told the ceiling
+ only by `get_node_settings`, which it never calls, and showed "of 1"."""
+ monkeypatch.setattr("meshbay_node.ops.settings.max_processes", lambda: 4)
+ state["groups_ctx"] = {}
+ page = (await ops.list_groups(state))["settings"]
+ assert page["cpu_count"] == 4
+ assert page == await ops.get_node_settings(state)
+
+
+@pytest.mark.asyncio
@pytest.mark.parametrize("value", [0, -1, 5, "many", True])
async def test_a_number_the_machine_cannot_honour_is_refused(state, monkeypatch, value):
monkeypatch.setattr("meshbay_node.ops.settings.max_processes", lambda: 4)