Skip to content

Commit a2b2476

Browse files
tests: Test connecting to a non-existing server
1 parent de04fde commit a2b2476

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

test/functional/interface_bitcoin_cli.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,9 @@ def run_test(self):
3535
assert_equal(["foo", "bar"], self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input=password + "\nfoo\nbar").echo())
3636
assert_raises_process_error(1, "Incorrect rpcuser or rpcpassword", self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input="foo").echo)
3737

38+
self.log.info("Test connecting to a non-existing server")
39+
assert_raises_process_error(1, "Could not connect to the server", self.nodes[0].cli('-rpcport=1').echo)
40+
3841
self.log.info("Make sure that -getinfo with arguments fails")
3942
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
4043

0 commit comments

Comments
 (0)