plugeth/core/state/snapshot
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
..
account.go core/state/snapshot: implement storage iterator (#20971) 2020-04-29 12:53:08 +03:00
conversion.go core, eth: faster snapshot generation (#22504) 2021-04-14 23:23:11 +03:00
difflayer_test.go core/state/snapshot: fix benchmarks (#23804) 2021-10-26 11:01:01 +02:00
difflayer.go core/state/snapshot: remove noop map item assignment 2022-04-07 09:36:44 +03:00
disklayer_test.go all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
disklayer.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
generate_test.go core, light, tests, trie: add state metrics (#23433) 2021-08-24 22:00:42 +03:00
generate.go core/state/snapshot: clean up the generation code (#24479) 2022-03-29 20:37:35 +02:00
iterator_binary.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
iterator_fast.go snapshot, trie: fixed typos, mostly in snapshot pkg (#22133) 2021-01-07 08:36:21 +02:00
iterator_test.go core/state/snapshot: implement storage iterator (#20971) 2020-04-29 12:53:08 +03:00
iterator.go core: fix typo in iterator.go (#23502) 2021-08-31 10:21:42 +02:00
journal.go cmd/geth: add db cmd to show metadata (#23900) 2022-01-18 12:30:41 +02:00
snapshot_test.go core/state/snapshot: fix data race in layer flattening (#23628) 2021-10-15 10:52:40 +03:00
snapshot.go core/rawdb: add specified key length iterator (#24535) 2022-03-15 10:28:26 +02:00
sort.go core: fix broken tests due to API changes + linter 2020-02-25 12:51:16 +02:00
wipe_test.go core/vm, core/state/snapshot: remove unused code (#23956) 2021-11-25 10:37:47 +02:00
wipe.go core/vm, core/state/snapshot: remove unused code (#23956) 2021-11-25 10:37:47 +02:00