test: -norpccookiefile

Both bitcoind and bitcoin-cli.
This commit is contained in:
Hodlinator
2024-11-25 10:50:40 +01:00
parent 39cbd4f37c
commit 7402658bc2
2 changed files with 25 additions and 2 deletions

View File

@@ -164,6 +164,9 @@ class TestBitcoinCli(BitcoinTestFramework):
self.log.info("Test connecting with non-existing RPC cookie file")
assert_raises_process_error(1, "Could not locate RPC credentials", self.nodes[0].cli('-rpccookiefile=does-not-exist', '-rpcpassword=').echo)
self.log.info("Test connecting without RPC cookie file and with password arg")
assert_equal(BLOCKS, self.nodes[0].cli('-norpccookiefile', f'-rpcuser={user}', f'-rpcpassword={password}').getblockcount())
self.log.info("Test -getinfo with arguments fails")
assert_raises_process_error(1, "-getinfo takes no arguments", self.nodes[0].cli('-getinfo').help)