Skip to content

Commit d1aa0ae

Browse files
author
MarcoFalke
committed
Merge #18712: test: display command line options passed to send_cli() in debug log
8f5dc88 test: display command line options passed to send_cli() in debug log (Jon Atack) Pull request description: as per bitcoin/bitcoin#18691 (comment), and revert two cli calls changed in #18691 from rpc commands back to command line options (these were the only occurrences). ACKs for top commit: MarcoFalke: ACK 8f5dc88 Tree-SHA512: fcb3eca00aa4099066028c90d5e50a02e074366e09a17f5f5b937d9f7562dd054ff65681aa0ad4c94f6de1e98b1e2b9ac4cd084ddc297010253989a80483b1b9
2 parents 85bae24 + 8f5dc88 commit d1aa0ae

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)