accounts/keystore: use t.TempDir in test (#30052)

This commit is contained in:
Daniel Liu 2025-01-14 10:56:17 +08:00
parent d2e00672c5
commit 62895df693

View file

@ -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)