Skip to content

Commit 8b2ef27

Browse files
tests: Test connecting with non-existing RPC cookie file
1 parent a2b2476 commit 8b2ef27

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
@@ -38,6 +38,9 @@ def run_test(self):
3838
self.log.info("Test connecting to a non-existing server")
3939
assert_raises_process_error(1, "Could not connect to the server", self.nodes[0].cli('-rpcport=1').echo)
4040

41+
self.log.info("Test connecting with non-existing RPC cookie file")
42+
assert_raises_process_error(1, "Could not locate RPC credentials", self.nodes[0].cli('-rpccookiefile=does-not-exist', '-rpcpassword=').echo)
43+
4144
self.log.info("Make sure that -getinfo with arguments fails")
4245
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)
4346

0 commit comments

Comments
 (0)