mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-03 01:41:48 +00:00
*: upgrade tests to use T.Cleanup()
This commit is contained in:
parent
0cec99a3ea
commit
2c81fc8b8e
41 changed files with 137 additions and 220 deletions
|
@ -11,10 +11,10 @@ import (
|
|||
func TestGetPath(t *testing.T) {
|
||||
testPath, err := ioutil.TempDir("./", "")
|
||||
require.NoError(t, err)
|
||||
defer func() {
|
||||
t.Cleanup(func() {
|
||||
err := os.RemoveAll(testPath)
|
||||
require.NoError(t, err)
|
||||
}()
|
||||
})
|
||||
path, err := getPath(testPath, 123)
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, testPath+"/BlockStorage_100000/dump-block-1000.json", path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue