mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-10 14:08:40 +01:00
Replace cookie auth in tests
Since rpcuser and rpcpassword are now deprecated, replace them with cookie auth. Fix test failures with cookie auth
This commit is contained in:
@@ -28,6 +28,7 @@ from .util import (
|
||||
get_mocktime,
|
||||
get_rpc_proxy,
|
||||
initialize_datadir,
|
||||
get_datadir_path,
|
||||
log_filename,
|
||||
p2p_port,
|
||||
rpc_url,
|
||||
@@ -300,13 +301,13 @@ class BitcoinTestFramework(object):
|
||||
args.append("-connect=127.0.0.1:" + str(p2p_port(0)))
|
||||
bitcoind_processes[i] = subprocess.Popen(args)
|
||||
self.log.debug("initialize_chain: bitcoind started, waiting for RPC to come up")
|
||||
wait_for_bitcoind_start(bitcoind_processes[i], rpc_url(i), i)
|
||||
wait_for_bitcoind_start(bitcoind_processes[i], datadir, i)
|
||||
self.log.debug("initialize_chain: RPC successfully started")
|
||||
|
||||
self.nodes = []
|
||||
for i in range(MAX_NODES):
|
||||
try:
|
||||
self.nodes.append(get_rpc_proxy(rpc_url(i), i))
|
||||
self.nodes.append(get_rpc_proxy(rpc_url(get_datadir_path(cachedir, i), i), i))
|
||||
except:
|
||||
self.log.exception("Error connecting to node %d" % i)
|
||||
sys.exit(1)
|
||||
|
||||
Reference in New Issue
Block a user