aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests
diff options
context:
space:
mode:
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)