From ec884f4ece1b166651065b8ed02c61dafea5968e Mon Sep 17 00:00:00 2001 From: Alper Gundogdu Date: Fri, 11 Sep 2026 15:12:50 +0100 Subject: [PATCH] fix(molecule): sync stub key-gen to --keystore-password-file Commit #45 renamed the role's key-gen flag from --password-file to --keystore-password-file but left the Molecule stub's key_gen() parsing the old flag, so the generate-keystore scenario's converge fails with "stub key-gen: --output-dir and --password-file are required" and the Molecule workflow is red on main. Point the stub at --keystore-password-file (and update the two doc comments) to match the role's real invocation. Co-Authored-By: Claude Opus 4.8 --- ansible/molecule/default/files/decdn-node-stub | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/ansible/molecule/default/files/decdn-node-stub b/ansible/molecule/default/files/decdn-node-stub index 302cbcf..01e5ba2 100755 --- a/ansible/molecule/default/files/decdn-node-stub +++ b/ansible/molecule/default/files/decdn-node-stub @@ -22,8 +22,8 @@ can be exercised end-to-end without a published release or a live chain: covers key-level drift against the real upstream field list. * `key-gen ...` -> stand in for the CLI's wallet generator (exercised by the `generate-keystore` scenario). Enforces the contract the ROLE - ASSUMES (not a verified real-CLI fact): the --password-file is - passed in and must already exist. Writes dummy node.secret + + ASSUMES (not a verified real-CLI fact): the + --keystore-password-file is passed in and must already exist. Writes dummy node.secret + keystore.json into --output-dir and prints the NodeId + a public eth address. No real crypto — the scenario checks that the role minted the password + keystore, not wallet correctness. @@ -83,14 +83,14 @@ def key_gen(args): """Stub `decdn key-gen`: mint dummy node.secret + keystore.json. Enforces the contract the role ASSUMES (not verified against the real CLI): the - --password-file is supplied and must already exist (the role generates it just - before calling us), and the wallet material lands under --output-dir. Prints the + --keystore-password-file is supplied and must already exist (the role generates it + just before calling us), and the wallet material lands under --output-dir. Prints the NodeId + a public eth address. """ output_dir = _opt(args, "--output-dir") - password_file = _opt(args, "--password-file") + password_file = _opt(args, "--keystore-password-file") if not output_dir or not password_file: - print("stub key-gen: --output-dir and --password-file are required", file=sys.stderr) + print("stub key-gen: --output-dir and --keystore-password-file are required", file=sys.stderr) return 2 if not os.path.isfile(password_file): print(f"stub key-gen: password file not found: {password_file}", file=sys.stderr)