aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-hub/tests
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-hub/tests')
-rw-r--r--packages/meshbay-hub/tests/test_app_settings_plugin.py25
1 files changed, 19 insertions, 6 deletions
diff --git a/packages/meshbay-hub/tests/test_app_settings_plugin.py b/packages/meshbay-hub/tests/test_app_settings_plugin.py
index af86f12..940d975 100644
--- a/packages/meshbay-hub/tests/test_app_settings_plugin.py
+++ b/packages/meshbay-hub/tests/test_app_settings_plugin.py
@@ -256,15 +256,28 @@ def test_each_app_takes_a_list_of_directories(app, prop):
def test_the_lists_are_read_under_one_name_each():
"""
- One name per app on the ack — `<app>_directories`, always a list. A second
- name for the same answer means a page that reads whichever it thinks of
- first, and a node that fills only the other one empties a working tab.
+ One name per app on the ack — `<app>_directories`, always a list — and the
+ shell names none of them.
+
+ It read three by hand until 2026-09-10, and `helloworld` was not among them:
+ the app that exists to prove a new one needs no special-casing had its
+ directories dropped on arrival, which made the plugin claim false exactly
+ where it is demonstrated. An app the node knows about must be one this page
+ already handles, and the only way to guarantee that is to read the ack's own
+ keys instead of a list kept here.
+
+ A second *name* for the same answer would be the older fault: a page reading
+ whichever it thinks of first, and a node filling only the other one emptying
+ a working tab.
"""
page = GROUP_PAGE.read_text(encoding="utf-8")
- block = page[page.index("setAppDirectories({"):]
+ block = page[page.index("setAppDirectories("):]
block = block[:block.index("setChatDirectory")]
- assert "ack.video_directories" in block and "ack.music_directories" in block
- assert "ack.photo_directories" in block
+ assert "endsWith('_directories')" in block, (
+ "the shell must derive the map from the ack's keys, not name apps")
+ for named in ("ack.video_directories", "ack.music_directories",
+ "ack.photo_directories"):
+ assert named not in block, f"{named} is an application named by the shell"
for gone in ("ack.video_root", "ack.audio_root", "ack.photo_roots"):
assert gone not in block, f"{gone} is a second name for the same answer"