mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-01-10 03:47:29 -03:00
test: add norpcauth test
Adds test for disabling rpcauth args. Co-Authored-By: Luke Dashjr <luke-jr+git@utopios.org>
This commit is contained in:
parent
67df0dec1a
commit
2ad3689512
1 changed files with 6 additions and 0 deletions
|
@ -159,6 +159,12 @@ class HTTPBasicsTest(BitcoinTestFramework):
|
|||
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=[rpcauth_user1, '-rpcauth=', rpcauth_user2])
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=', rpcauth_user1, rpcauth_user2])
|
||||
|
||||
self.log.info('Check -norpcauth disables previous -rpcauth params')
|
||||
self.restart_node(0, extra_args=[rpcauth_user1, rpcauth_user2, '-norpcauth'])
|
||||
assert_equal(401, call_with_auth(self.nodes[0], 'user1', 'bitcoin').status)
|
||||
assert_equal(401, call_with_auth(self.nodes[0], 'rt', self.rtpassword).status)
|
||||
self.stop_node(0)
|
||||
|
||||
self.log.info('Check that failure to write cookie file will abort the node gracefully')
|
||||
(self.nodes[0].chain_path / ".cookie.tmp").mkdir()
|
||||
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error)
|
||||
|
|
Loading…
Reference in a new issue