@@ -43,11 +43,13 @@ func tmpDatadirWithKeystore(t *testing.T) string {
43
43
}
44
44
45
45
func TestAccountListEmpty (t * testing.T ) {
46
+ t .Parallel ()
46
47
geth := runGeth (t , "account" , "list" )
47
48
geth .ExpectExit ()
48
49
}
49
50
50
51
func TestAccountList (t * testing.T ) {
52
+ t .Parallel ()
51
53
datadir := tmpDatadirWithKeystore (t )
52
54
var want = `
53
55
Account #0: {7ef5a6135f1fd6a02593eedc869c6d41d934aef8} keystore://{{.Datadir}}/keystore/UTC--2016-03-22T12-57-55.920751759Z--7ef5a6135f1fd6a02593eedc869c6d41d934aef8
@@ -74,6 +76,7 @@ Account #2: {289d485d9771714cce91d3393d764e1311907acc} keystore://{{.Datadir}}\k
74
76
}
75
77
76
78
func TestAccountNew (t * testing.T ) {
79
+ t .Parallel ()
77
80
geth := runGeth (t , "account" , "new" , "--lightkdf" )
78
81
defer geth .ExpectExit ()
79
82
geth .Expect (`
@@ -96,6 +99,7 @@ Path of the secret key file: .*UTC--.+--[0-9a-f]{40}
96
99
}
97
100
98
101
func TestAccountImport (t * testing.T ) {
102
+ t .Parallel ()
99
103
tests := []struct { name , key , output string }{
100
104
{
101
105
name : "correct account" ,
@@ -118,6 +122,7 @@ func TestAccountImport(t *testing.T) {
118
122
}
119
123
120
124
func TestAccountHelp (t * testing.T ) {
125
+ t .Parallel ()
121
126
geth := runGeth (t , "account" , "-h" )
122
127
geth .WaitExit ()
123
128
if have , want := geth .ExitStatus (), 0 ; have != want {
@@ -147,6 +152,7 @@ func importAccountWithExpect(t *testing.T, key string, expected string) {
147
152
}
148
153
149
154
func TestAccountNewBadRepeat (t * testing.T ) {
155
+ t .Parallel ()
150
156
geth := runGeth (t , "account" , "new" , "--lightkdf" )
151
157
defer geth .ExpectExit ()
152
158
geth .Expect (`
@@ -159,6 +165,7 @@ Fatal: Passwords do not match
159
165
}
160
166
161
167
func TestAccountUpdate (t * testing.T ) {
168
+ t .Parallel ()
162
169
datadir := tmpDatadirWithKeystore (t )
163
170
geth := runGeth (t , "account" , "update" ,
164
171
"--datadir" , datadir , "--lightkdf" ,
@@ -175,6 +182,7 @@ Repeat password: {{.InputLine "foobar2"}}
175
182
}
176
183
177
184
func TestWalletImport (t * testing.T ) {
185
+ t .Parallel ()
178
186
geth := runGeth (t , "wallet" , "import" , "--lightkdf" , "testdata/guswallet.json" )
179
187
defer geth .ExpectExit ()
180
188
geth .Expect (`
@@ -190,6 +198,7 @@ Address: {d4584b5f6229b7be90727b0fc8c6b91bb427821f}
190
198
}
191
199
192
200
func TestWalletImportBadPassword (t * testing.T ) {
201
+ t .Parallel ()
193
202
geth := runGeth (t , "wallet" , "import" , "--lightkdf" , "testdata/guswallet.json" )
194
203
defer geth .ExpectExit ()
195
204
geth .Expect (`
@@ -200,6 +209,7 @@ Fatal: could not decrypt key with given password
200
209
}
201
210
202
211
func TestUnlockFlag (t * testing.T ) {
212
+ t .Parallel ()
203
213
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
204
214
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "console" , "--exec" , "loadScript('testdata/empty.js')" )
205
215
geth .Expect (`
@@ -222,6 +232,7 @@ undefined
222
232
}
223
233
224
234
func TestUnlockFlagWrongPassword (t * testing.T ) {
235
+ t .Parallel ()
225
236
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
226
237
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "console" , "--exec" , "loadScript('testdata/empty.js')" )
227
238
@@ -240,6 +251,7 @@ Fatal: Failed to unlock account f466859ead1932d743d622cb74fc058882e8648a (could
240
251
241
252
// https://github.com/ethereum/go-ethereum/issues/1785
242
253
func TestUnlockFlagMultiIndex (t * testing.T ) {
254
+ t .Parallel ()
243
255
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
244
256
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "--unlock" , "0,2" , "console" , "--exec" , "loadScript('testdata/empty.js')" )
245
257
@@ -266,6 +278,7 @@ undefined
266
278
}
267
279
268
280
func TestUnlockFlagPasswordFile (t * testing.T ) {
281
+ t .Parallel ()
269
282
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
270
283
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "--password" , "testdata/passwords.txt" , "--unlock" , "0,2" , "console" , "--exec" , "loadScript('testdata/empty.js')" )
271
284
@@ -287,6 +300,7 @@ undefined
287
300
}
288
301
289
302
func TestUnlockFlagPasswordFileWrongPassword (t * testing.T ) {
303
+ t .Parallel ()
290
304
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
291
305
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "--password" ,
292
306
"testdata/wrong-passwords.txt" , "--unlock" , "0,2" )
@@ -297,6 +311,7 @@ Fatal: Failed to unlock account 0 (could not decrypt key with given password)
297
311
}
298
312
299
313
func TestUnlockFlagAmbiguous (t * testing.T ) {
314
+ t .Parallel ()
300
315
store := filepath .Join (".." , ".." , "accounts" , "keystore" , "testdata" , "dupes" )
301
316
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
302
317
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "--keystore" ,
@@ -336,6 +351,7 @@ undefined
336
351
}
337
352
338
353
func TestUnlockFlagAmbiguousWrongPassword (t * testing.T ) {
354
+ t .Parallel ()
339
355
store := filepath .Join (".." , ".." , "accounts" , "keystore" , "testdata" , "dupes" )
340
356
geth := runMinimalGeth (t , "--port" , "0" , "--ipcdisable" , "--datadir" , tmpDatadirWithKeystore (t ),
341
357
"--unlock" , "f466859ead1932d743d622cb74fc058882e8648a" , "--keystore" ,
0 commit comments