diff options
author | tdb3 <106488469+tdb3@users.noreply.github.com> | 2024-08-06 13:57:27 -0400 |
---|---|---|
committer | tdb3 <106488469+tdb3@users.noreply.github.com> | 2024-08-09 17:56:57 -0400 |
commit | 2ad3689512a36eaff957df9ac28e65b2fedbc36c (patch) | |
tree | 2a37a21b51647ee4e2a4548ffc01ba4eafe7573c /test/functional/rpc_users.py | |
parent | 67df0dec1abe547773e532aa60aff0317e018123 (diff) |
test: add norpcauth test
Adds test for disabling rpcauth args.
Co-Authored-By: Luke Dashjr <luke-jr+git@utopios.org>
Diffstat (limited to 'test/functional/rpc_users.py')
-rwxr-xr-x | test/functional/rpc_users.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py index 3fe4b7c518..c5c9d3c86c 100755 --- a/test/functional/rpc_users.py +++ b/test/functional/rpc_users.py @@ -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) |