plugeth/internal
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
..
build build: close sftp connection when done (#24593) 2022-03-27 13:21:36 +02:00
cmdtest cmd/evm: add tests for evm t8n (#23507) 2021-09-02 09:22:43 +02:00
debug internal/debug: make gosimple linter happy 2021-09-20 18:55:35 +03:00
ethapi eth/tracers: refactor traceTx to separate out struct logging (#24326) 2022-04-06 09:34:18 +02:00
flags cmd/geth: set EnableBashCompletion = true (#24313) 2022-03-15 10:38:23 +01:00
guide all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
jsre all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
shutdowncheck eth, les: update unclean shutdown markers regularly (#24077) 2021-12-17 15:18:51 +01:00
syncx core: improve shutdown synchronization in BlockChain (#22853) 2021-10-07 15:47:50 +02:00
testlog internal/testlog: print file+line number of log call in test log (#20528) 2020-01-08 17:11:51 +02:00
utesting cmd/devp2p, internal/utesting: implement TAP output (#21760) 2020-11-04 15:02:58 +01:00
web3ext internal/web3ext: add eth.getLogs wrapper (#24297) 2022-01-27 10:56:04 +01:00