go-ethereum/accounts
Eng Zer Jun 8d066f1f42
all: use T.TempDir to create temporary test directories (#24633)
This commit replaces ioutil.TempDir with t.TempDir in tests. The
directory created by t.TempDir is automatically removed when the test
and all its subtests complete.

Prior to this commit, temporary directory created using ioutil.TempDir
had to be removed manually by calling os.RemoveAll, which is omitted in
some tests. The error handling boilerplate e.g.

	defer func() {
		if err := os.RemoveAll(dir); err != nil {
			t.Fatal(err)
		}
	}

is also tedious, but t.TempDir handles this for us nicely.

Reference: https://pkg.go.dev/testing#T.TempDir
Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2022-04-08 15:44:55 +02:00
..
abi all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
external accounts/external: handle 0 chainid as not-set for the Clef API (#23394) 2021-08-13 15:39:51 +03:00
keystore all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
scwallet accouts/scwallet: typo fix (#24207) 2022-01-07 16:45:53 +02:00
usbwallet accouts/scwallet: typo fix (#24207) 2022-01-07 16:45:53 +02:00
accounts_test.go all: update author list and licenses 2019-07-22 12:17:27 +03:00
accounts.go accounts: correct spelling mistake (#24323) 2022-02-01 11:36:39 +02:00
errors.go accounts: fix typo in errors.go (#24270) 2022-01-24 06:44:29 +02:00
hd_test.go accounts, signer: fix Ledger Live account derivation path (clef) (#21757) 2020-11-29 13:43:15 +01:00
hd.go accounts, signer: fix Ledger Live account derivation path (clef) (#21757) 2020-11-29 13:43:15 +01:00
manager.go node: remove dependency on wallet backend packages (#23019) 2021-08-25 22:34:22 +02:00
sort.go accounts, console: frendly card errors, support pin unblock 2019-04-08 13:19:37 +02:00
url_test.go all: update author list and licenses 2019-07-22 12:17:27 +03:00
url.go all: make logs a bit easier on the eye to digest (#22665) 2021-04-15 20:35:00 +03:00