@@ -40,14 +40,21 @@ def setup_chain(self):
40
40
super ().setup_chain ()
41
41
#Append rpcauth to bitcoin.conf before initialization
42
42
rpcauth = "rpcauth=rt:93648e835a54c573682c2eb19f882535$7681e9c5b74bdd85e78166031d2058e1069b3ed7ed967c93fc63abba06f31144"
43
- rpcauth2 = "rpcauth=rt2:f8607b1a88861fac29dfccf9b52ff9f$ff36a0c23c8c62b4846112e50fa888416e94c17bfd4c42f88fd8f55ec6a3137e"
44
43
rpcuser = "rpcuser=rpcuser💻"
45
44
rpcpassword = "rpcpassword=rpcpassword🔑"
46
45
47
- self .user = '' .join (SystemRandom ().choice (string .ascii_letters + string .digits ) for _ in range (10 ))
48
46
config = configparser .ConfigParser ()
49
47
config .read_file (open (self .options .configfile ))
50
48
gen_rpcauth = config ['environment' ]['RPCAUTH' ]
49
+
50
+ # Generate RPCAUTH with specified password
51
+ self .rt2password = "8/F3uMDw4KSEbw96U3CA1C4X05dkHDN2BPFjTgZW4KI="
52
+ p = subprocess .Popen ([sys .executable , gen_rpcauth , 'rt2' , self .rt2password ], stdout = subprocess .PIPE , universal_newlines = True )
53
+ lines = p .stdout .read ().splitlines ()
54
+ rpcauth2 = lines [1 ]
55
+
56
+ # Generate RPCAUTH without specifying password
57
+ self .user = '' .join (SystemRandom ().choice (string .ascii_letters + string .digits ) for _ in range (10 ))
51
58
p = subprocess .Popen ([sys .executable , gen_rpcauth , self .user ], stdout = subprocess .PIPE , universal_newlines = True )
52
59
lines = p .stdout .read ().splitlines ()
53
60
rpcauth3 = lines [1 ]
@@ -82,11 +89,10 @@ def run_test(self):
82
89
url = urllib .parse .urlparse (self .nodes [0 ].url )
83
90
84
91
password = "cA773lm788buwYe4g4WT+05pKyNruVKjQ25x3n0DQcM="
85
- password2 = "8/F3uMDw4KSEbw96U3CA1C4X05dkHDN2BPFjTgZW4KI="
86
92
87
93
self .test_auth (self .nodes [0 ], url .username , url .password )
88
94
self .test_auth (self .nodes [0 ], 'rt' , password )
89
- self .test_auth (self .nodes [0 ], 'rt2' , password2 )
95
+ self .test_auth (self .nodes [0 ], 'rt2' , self . rt2password )
90
96
self .test_auth (self .nodes [0 ], self .user , self .password )
91
97
92
98
###############################################################
0 commit comments