mirror of
https://github.com/bitcoin/bitcoin.git
synced 2024-11-20 10:38:42 +01:00
tests: Test connecting to a non-existing server
This commit is contained in:
parent
de04fde534
commit
a2b2476e96
@ -35,6 +35,9 @@ class TestBitcoinCli(BitcoinTestFramework):
|
|||||||
assert_equal(["foo", "bar"], self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input=password + "\nfoo\nbar").echo())
|
assert_equal(["foo", "bar"], self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input=password + "\nfoo\nbar").echo())
|
||||||
assert_raises_process_error(1, "Incorrect rpcuser or rpcpassword", self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input="foo").echo)
|
assert_raises_process_error(1, "Incorrect rpcuser or rpcpassword", self.nodes[0].cli('-rpcuser=%s' % user, '-stdin', '-stdinrpcpass', input="foo").echo)
|
||||||
|
|
||||||
|
self.log.info("Test connecting to a non-existing server")
|
||||||
|
assert_raises_process_error(1, "Could not connect to the server", self.nodes[0].cli('-rpcport=1').echo)
|
||||||
|
|
||||||
self.log.info("Make sure that -getinfo with arguments fails")
|
self.log.info("Make sure that -getinfo with arguments fails")
|
||||||
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
|
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user