Skip to content

Commit

Permalink
accounts/keystore: use t.TempDir in test (ethereum#30052)
Browse files Browse the repository at this point in the history
  • Loading branch information
Halimao authored and gzliudan committed Jan 11, 2025
1 parent 5435e67 commit 659d120
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions accounts/keystore/account_cache_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,11 +325,7 @@ func TestUpdatedKeyfileContents(t *testing.T) {
t.Parallel()

// Create a temporary keystore to test with
dir := filepath.Join(os.TempDir(), fmt.Sprintf("eth-keystore-updatedkeyfilecontents-test-%d-%d", os.Getpid(), rand.Int()))

// Create the directory
os.MkdirAll(dir, 0700)
defer os.RemoveAll(dir)
dir := t.TempDir()

ks := NewKeyStore(dir, LightScryptN, LightScryptP)

Expand Down

0 comments on commit 659d120

Please sign in to comment.