bsc/eth/filters
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
..
api_test.go common: delete StringToAddress, StringToHash (#16436) 2018-04-10 14:12:07 +03:00
api.go eth/filters: remove unused field 'chaindb' in PublicFilterAPI (#24072) 2021-12-07 02:36:01 +01:00
bench_test.go eth/filters, p2p/simulations: fix benchmarks (#23806) 2021-10-29 14:37:00 +02:00
filter_system_test.go eth/filters: fix TestPendingLogsSubscription (#23619) 2021-10-04 14:09:51 +02:00
filter_system.go all: remove redundant conversions and import names (#21903) 2020-11-25 21:00:23 +01:00
filter_test.go all: use T.TempDir to create temporary test directories (#24633) 2022-04-08 15:44:55 +02:00
filter.go eth/filters: fix typo on unindexedLogs function's comment (#20827) 2020-03-27 16:33:14 +01:00