go-pulse/cmd
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
..
abidump signer/core: move API JSON types to separate package (#23275) 2021-07-29 16:06:44 +02:00
abigen cmd/abigen: clarify abigen alias flag usage (#21875) 2020-12-12 17:36:32 +01:00
bootnode les: switch to new discv5 (#21940) 2021-01-26 21:41:35 +01:00
checkpoint-admin cmd/clef: change --rpcport to --http.port and update flags in docs (#21318) 2020-07-14 10:35:32 +02:00
clef cmd/geth, node, rpc: implement jwt tokens (#24364) 2022-03-07 09:30:27 +02:00
devp2p cmd/devp2p: implement snap protocol testing (#24276) 2022-02-04 15:24:32 +01:00
ethkey all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
evm core/types: improve error for too short transaction / receipt encoding (#24256) 2022-03-09 10:44:53 +01:00
faucet all: fix some go-critic linter warnings (#23709) 2021-10-13 17:31:02 +02:00
geth all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
p2psim node: refactor package node (#21105) 2020-08-03 19:40:46 +02:00
puppeth cmd/puppeth: make it possible to have pw-protected keyfiles (#22148) 2021-11-02 13:21:25 +01:00
rlpdump cmd/rlpdump: add support for text to rlp (#23745) 2021-10-18 13:38:00 +02:00
utils node: allow JWT pass by file only (#24579) 2022-03-24 15:04:47 +01:00