Changeset View
Changeset View
Standalone View
Standalone View
test/functional/rpc_users.py
Show All 40 Lines | def setup_chain(self): | ||||
stdout=subprocess.PIPE, universal_newlines=True) | stdout=subprocess.PIPE, universal_newlines=True) | ||||
lines = p.stdout.read().splitlines() | lines = p.stdout.read().splitlines() | ||||
rpcauth3 = lines[1] | rpcauth3 = lines[1] | ||||
self.password = lines[3] | self.password = lines[3] | ||||
with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "bitcoin.conf"), 'a', encoding='utf8') as f: | with open(os.path.join(get_datadir_path(self.options.tmpdir, 0), "bitcoin.conf"), 'a', encoding='utf8') as f: | ||||
f.write(rpcauth + "\n") | f.write(rpcauth + "\n") | ||||
f.write(rpcauth2 + "\n") | f.write(rpcauth2 + "\n") | ||||
f.write(rpcauth3+"\n") | f.write(rpcauth3 + "\n") | ||||
with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "bitcoin.conf"), 'a', encoding='utf8') as f: | with open(os.path.join(get_datadir_path(self.options.tmpdir, 1), "bitcoin.conf"), 'a', encoding='utf8') as f: | ||||
f.write(rpcuser + "\n") | f.write(rpcuser + "\n") | ||||
f.write(rpcpassword + "\n") | f.write(rpcpassword + "\n") | ||||
def run_test(self): | def run_test(self): | ||||
# | # | ||||
# Check correctness of the rpcauth config option # | # Check correctness of the rpcauth config option # | ||||
▲ Show 20 Lines • Show All 150 Lines • Show Last 20 Lines |