aboutsummaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_index_no_cleartext.py
diff options
context:
space:
mode:
Diffstat (limited to 'packages/meshbay-node/tests/test_index_no_cleartext.py')
-rw-r--r--packages/meshbay-node/tests/test_index_no_cleartext.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/meshbay-node/tests/test_index_no_cleartext.py b/packages/meshbay-node/tests/test_index_no_cleartext.py
index f510884..e5e4555 100644
--- a/packages/meshbay-node/tests/test_index_no_cleartext.py
+++ b/packages/meshbay-node/tests/test_index_no_cleartext.py
@@ -151,9 +151,15 @@ def test_index_progress_stays_clear_and_stays_counters():
dicts = [n for n in ast.walk(tree) if isinstance(n, ast.Dict)]
assert len(dicts) == 1, "more than one message built here — re-read this test"
keys = {k.value for k in dicts[0].keys}
+ # `kind` is one of four fixed words and `root_pos`/`queued` are integers —
+ # the root names themselves stay on the loopback API.
assert keys == {"type", "v", "group_id",
- "scanning", "scanned_bytes", "total_bytes"}, (
+ "scanning", "scanned_bytes", "total_bytes",
+ "files_done", "files_total", "kind", "root_pos", "queued"}, (
f"index_progress now carries {keys} — re-read decision D3 before shipping it")
+ values = {k.value: v for k, v in zip(dicts[0].keys, dicts[0].values)}
+ assert ast.unparse(values["queued"]) == "len(progress.queued)", (
+ "the roots waiting must go out as a count, never as their names")
assert "seal(" not in source
assert "D3" in source, "the reason it is not sealed must stay next to the code"