Commit Graph

8 Commits

Author SHA1 Message Date
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
f8790b9482 mobile: fix CopyFile switch to package cp 2019-11-20 14:42:36 +02:00
1bf508b449 accounts/abi/bind: support event filtering in abigen 2018-01-24 10:54:13 +02:00
b8793edd83 mobile: add a regression test for signer recovery 2017-06-13 13:39:39 +03:00
833e4d1319 accounts, cmd, eth, internal, mobile, node: split account backends 2017-02-13 14:00:02 +02:00
b56aee3697 mobile: rename passphrase signing method to avoid Swift rewrite 2017-01-06 17:47:15 +02:00
b37d175e59 accounts, internal, mobile: polish accounts API, extend Android tests 2017-01-05 12:58:03 +02:00
5513c49c54 accounts/abi/bind, mobile: review fixes and android tests 2016-11-14 18:00:14 +02:00