Skip to content

Commit fe0c0b0

Browse files
authored
accounts/keystore: use t.TempDir in test (#30052)
1 parent 0a651f8 commit fe0c0b0

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

accounts/keystore/account_cache_test.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -325,11 +325,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
325325
t.Parallel()
326326

327327
// Create a temporary keystore to test with
328-
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))
329-
330-
// Create the directory
331-
os.MkdirAll(dir, 0700)
332-
defer os.RemoveAll(dir)
328+
dir := t.TempDir()
333329

334330
ks := NewKeyStore(dir, LightScryptN, LightScryptP)
335331

0 commit comments

Comments
 (0)