aboutsummaryrefslogtreecommitdiff
path: root/test/functional/rpc_users.py
diff options
context:
space:
mode:
authortdb3 <106488469+tdb3@users.noreply.github.com>2024-08-06 13:27:55 -0400
committertdb3 <106488469+tdb3@users.noreply.github.com>2024-08-09 17:18:23 -0400
commit67df0dec1abe547773e532aa60aff0317e018123 (patch)
tree891eb3e72f691fc12874f903593e5af2d18bf8a8 /test/functional/rpc_users.py
parentecc98ccff25b7e758337e764e59d764076772fec (diff)
test: blank rpcauth CLI interaction
Tests interactions between blank and non-blank rpcauth args.
Diffstat (limited to 'test/functional/rpc_users.py')
-rwxr-xr-xtest/functional/rpc_users.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/test/functional/rpc_users.py b/test/functional/rpc_users.py
index 49148b34ef..3fe4b7c518 100755
--- a/test/functional/rpc_users.py
+++ b/test/functional/rpc_users.py
@@ -150,6 +150,15 @@ class HTTPBasicsTest(BitcoinTestFramework):
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo$bar:baz'])
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo$bar$baz'])
+ self.log.info('Check interactions between blank and non-blank rpcauth')
+ # pw = bitcoin
+ rpcauth_user1 = '-rpcauth=user1:6dd184e5e69271fdd69103464630014f$eb3d7ce67c4d1ff3564270519b03b636c0291012692a5fa3dd1d2075daedd07b'
+ rpcauth_user2 = '-rpcauth=user2:57b2f77c919eece63cfa46c2f06e46ae$266b63902f99f97eeaab882d4a87f8667ab84435c3799f2ce042ef5a994d620b'
+ self.restart_node(0, extra_args=[rpcauth_user1, rpcauth_user2, '-rpcauth=']) # fixed in subsequent commit
+ self.stop_node(0)
+ 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 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)