summaryrefslogtreecommitdiffstats
path: root/packages/meshbay-node/tests/test_cli_dispatch.py
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-08-22 11:32:46 +0200
committerChristophe Besson <cbesson@gmail.com>2026-08-22 11:32:46 +0200
commit36fde6583bef6b455d2217d65eaaee2f66c08e81 (patch)
tree9589bbef08c6411c1b6bd923b0424feb3a8e9a4a /packages/meshbay-node/tests/test_cli_dispatch.py
parentb83eacc2d35f7357dc62b51b7b477182485c6bd8 (diff)
downloadmeshbay-36fde6583bef6b455d2217d65eaaee2f66c08e81.tar.gz
fix: meshbay-node init creates the keystore, status never does
- `init` now writes config AND creates the keystore (interactive password or unlock.key/env var). Idempotent: skips either step if already done. - `status` uses load_keystore instead of load_or_create_keystore — a read-only command should never silently create identity keys. - Stub getpass in test_cli_dispatch to prevent test hangs when no keystore exists. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'packages/meshbay-node/tests/test_cli_dispatch.py')
-rw-r--r--packages/meshbay-node/tests/test_cli_dispatch.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/packages/meshbay-node/tests/test_cli_dispatch.py b/packages/meshbay-node/tests/test_cli_dispatch.py
index 62dfe13..fdcd82e 100644
--- a/packages/meshbay-node/tests/test_cli_dispatch.py
+++ b/packages/meshbay-node/tests/test_cli_dispatch.py
@@ -74,6 +74,8 @@ def stub_daemon(monkeypatch, tmp_path):
# No interactive prompt left to hang on.
monkeypatch.setattr("builtins.input", lambda *a: "n")
+ import getpass
+ monkeypatch.setattr(getpass, "getpass", lambda *a, **kw: "test-password")
# `reload` looks for a real daemon and signals it. Without this the test
# SIGHUPs whatever node happens to be running on the machine — which it did,