diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-20 13:34:22 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-06-20 13:41:11 +0200 |
commit | 65c2058cc8e45c2f77a2ee27b89bc9440106d89b (patch) | |
tree | 5a6f0684f73ff6df3263ce70e38af19e5b54b6f0 /qa | |
parent | 12a541e8dae0a37bbb13fbe171d959eb8a0ed118 (diff) | |
parent | fad184550e1c507a897be59169f9c5dabce8d652 (diff) |
Merge #8066: [qa] test_framework: Use different rpc_auth_pair for each node
fad1845 [qa] test_framework: Use different rpc_auth_pair for each node (MarcoFalke)
Diffstat (limited to 'qa')
-rw-r--r-- | qa/rpc-tests/test_framework/util.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/qa/rpc-tests/test_framework/util.py b/qa/rpc-tests/test_framework/util.py index 782df52d62..32fe79efc3 100644 --- a/qa/rpc-tests/test_framework/util.py +++ b/qa/rpc-tests/test_framework/util.py @@ -156,17 +156,22 @@ def initialize_datadir(dirname, n): datadir = os.path.join(dirname, "node"+str(n)) if not os.path.isdir(datadir): os.makedirs(datadir) + rpc_u, rpc_p = rpc_auth_pair(n) with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f: f.write("regtest=1\n") - f.write("rpcuser=rt\n") - f.write("rpcpassword=rt\n") + f.write("rpcuser=" + rpc_u + "\n") + f.write("rpcpassword=" + rpc_p + "\n") f.write("port="+str(p2p_port(n))+"\n") f.write("rpcport="+str(rpc_port(n))+"\n") f.write("listenonion=0\n") return datadir +def rpc_auth_pair(n): + return 'rpcuser💻' + str(n), 'rpcpass🔑' + str(n) + def rpc_url(i, rpchost=None): - return "http://rt:rt@%s:%d" % (rpchost or '127.0.0.1', rpc_port(i)) + rpc_u, rpc_p = rpc_auth_pair(i) + return "http://%s:%s@%s:%d" % (rpc_u, rpc_p, rpchost or '127.0.0.1', rpc_port(i)) def wait_for_bitcoind_start(process, url, i): ''' |