Skip to content

Commit

Permalink
test: display command line options passed to send_cli() in debug log
Browse files Browse the repository at this point in the history
and fixup two cli calls from rpc commands to command line options.

Co-authored-by: MarcoFalke <[email protected]>
  • Loading branch information
jonatack and MarcoFalke committed Apr 21, 2020
1 parent 9773283 commit 8f5dc88
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions test/functional/interface_bitcoin_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def run_test(self):
self.log.info("Test -getinfo returns expected network and blockchain info")
if self.is_wallet_compiled():
self.nodes[0].encryptwallet(password)
cli_get_info = self.nodes[0].cli().send_cli('-getinfo')
cli_get_info = self.nodes[0].cli('-getinfo').send_cli()
network_info = self.nodes[0].getnetworkinfo()
blockchain_info = self.nodes[0].getblockchaininfo()
assert_equal(cli_get_info['version'], network_info['version'])
Expand All @@ -77,7 +77,7 @@ def run_test(self):

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

self.log.info("Test -rpcwait option successfully waits for RPC connection")
Expand Down
2 changes: 1 addition & 1 deletion test/functional/test_framework/test_node.py
Original file line number Diff line number Diff line change
Expand Up @@ -580,7 +580,7 @@ def send_cli(self, command=None, *args, **kwargs):
if command is not None:
p_args += [command]
p_args += pos_args + named_args
self.log.debug("Running bitcoin-cli command: %s" % command)
self.log.debug("Running bitcoin-cli {}".format(p_args[2:]))
process = subprocess.Popen(p_args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=subprocess.PIPE, universal_newlines=True)
cli_stdout, cli_stderr = process.communicate(input=self.input)
returncode = process.poll()
Expand Down

0 comments on commit 8f5dc88

Please sign in to comment.