Eng Zer Jun 83ad76637a
test: use T.TempDir to create temporary test directory (#2746)
This commit replaces `os.MkdirTemp` 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 `os.MkdirTemp`
needs 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>
2023-04-26 21:39:51 +01:00
2021-06-16 16:19:45 -04:00
2022-11-17 10:40:26 +01:00
2023-01-13 17:52:03 +00:00
2023-04-26 18:11:05 +01:00
2021-07-20 10:57:38 +02:00
2022-03-28 13:14:12 +01:00
2022-03-28 13:14:12 +01:00
2023-03-31 13:43:19 +01:00
2021-07-20 10:57:38 +02:00
2023-01-13 17:52:03 +00:00
2022-12-29 14:16:19 +08:00
2021-09-01 13:02:18 +01:00
2023-03-31 19:22:53 +02:00
2022-07-17 15:37:14 +02:00
2021-07-20 10:57:38 +02:00
2023-01-13 17:52:03 +00:00
2023-04-19 09:11:28 -04:00
Description
The Status module that consumes go-ethereum
https://status.im
Readme
Languages
Go 98.5%
Python 0.9%
Shell 0.3%
Makefile 0.1%
Groovy 0.1%