Skip to content

Commit 8f5dc88

Browse files
jonatackMarcoFalke
andcommitted
test: display command line options passed to send_cli() in debug log
and fixup two cli calls from rpc commands to command line options. Co-authored-by: MarcoFalke <[email protected]>
1 parent 9773283 commit 8f5dc88

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

test/functional/interface_bitcoin_cli.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ def run_test(self):
5151
self.log.info("Test -getinfo returns expected network and blockchain info")
5252
if self.is_wallet_compiled():
5353
self.nodes[0].encryptwallet(password)
54-
cli_get_info = self.nodes[0].cli().send_cli('-getinfo')
54+
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
5555
network_info = self.nodes[0].getnetworkinfo()
5656
blockchain_info = self.nodes[0].getblockchaininfo()
5757
assert_equal(cli_get_info['version'], network_info['version'])
@@ -77,7 +77,7 @@ def run_test(self):
7777

7878
self.log.info("Test -version with node stopped")
7979
self.stop_node(0)
80-
cli_response = self.nodes[0].cli().send_cli('-version')
80+
cli_response = self.nodes[0].cli('-version').send_cli()
8181
assert "{} RPC client version".format(self.config['environment']['PACKAGE_NAME']) in cli_response
8282

8383
self.log.info("Test -rpcwait option successfully waits for RPC connection")

test/functional/test_framework/test_node.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ def send_cli(self, command=None, *args, **kwargs):
580580
if command is not None:
581581
p_args += [command]
582582
p_args += pos_args + named_args
583-
self.log.debug("Running bitcoin-cli command: %s" % command)
583+
self.log.debug("Running bitcoin-cli {}".format(p_args[2:]))
584584
process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
585585
cli_stdout, cli_stderr = process.communicate(input=self.input)
586586
returncode = process.poll()

0 commit comments

Comments
 (0)