@@ -17,7 +17,9 @@ can be exercised end-to-end without a published release or a live chain:
1717 scenario uses this to prove the role's advisory probe warns
1818 (not fails) on timeout while the unit stays `running`.
1919 * `config validate ...`
20- -> parse the rendered node.toml as TOML and exit 0. A stub has no
20+ -> parse the rendered node.toml as TOML and exit 0. In the default
21+ scenario it also checks the exact literal DECDN_RPC_URL passed
22+ by the role's non-expanding EnvironmentFile loader. A stub has no
2123 schema, so this checks syntax only; `molecule/schema` is what
2224 covers key-level drift against the real upstream field list.
2325 * `key-gen ...` -> stand in for the CLI's wallet generator (exercised by the
@@ -128,6 +130,22 @@ def config_validate(args):
128130 if not os .path .isfile (config ):
129131 print (f"stub config validate: no such config file: { config } " , file = sys .stderr )
130132 return 1
133+ if os .environ .get ("DECDN_MOLECULE_ASSERT_RPC_LITERAL" ) == "1" :
134+ expected_rpc = (
135+ "https://rpc.example.invalid/?token=$HOME"
136+ "$(touch /tmp/decdn-rpc-expanded)"e=o'brien"
137+ )
138+ expected_extra = 'a "quoted" \\ value'
139+ if (
140+ os .environ .get ("DECDN_RPC_URL" ) != expected_rpc
141+ or os .environ .get ("DECDN_MOLECULE_EXTRA" ) != expected_extra
142+ ):
143+ print (
144+ "stub config validate: an EnvironmentFile value was expanded or "
145+ "decoded incorrectly" ,
146+ file = sys .stderr ,
147+ )
148+ return 1
131149 try :
132150 with open (config , "rb" ) as fh :
133151 tomllib .load (fh )
0 commit comments