Skip to content

Commit ecc98cc

Browse files
committed
test: add cases for blank rpcauth
1 parent 2aff9a3 commit ecc98cc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

test/functional/rpc_users.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,11 @@ def run_test(self):
139139
init_error = 'Error: Unable to start HTTP server. See debug log for details.'
140140

141141
self.log.info('Check -rpcauth are validated')
142-
# Empty -rpcauth= are ignored
142+
self.log.info('Empty -rpcauth are ignored')
143+
self.restart_node(0, extra_args=['-rpcauth'])
143144
self.restart_node(0, extra_args=['-rpcauth='])
144145
self.stop_node(0)
146+
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=""'])
145147
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo'])
146148
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo:bar'])
147149
self.nodes[0].assert_start_raises_init_error(expected_msg=init_error, extra_args=['-rpcauth=foo:bar:baz'])

0 commit comments

Comments
 (0)