mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2025-05-04 09:02:28 +00:00
*: create real temporary dirs and files in tests
Improve reliability.
This commit is contained in:
parent
3b19b34122
commit
0583f252ab
8 changed files with 77 additions and 59 deletions
|
@ -12,8 +12,8 @@ import (
|
|||
)
|
||||
|
||||
func TestDBRestore(t *testing.T) {
|
||||
tmpDir := path.Join(os.TempDir(), "neogo.restoretest")
|
||||
require.NoError(t, os.Mkdir(tmpDir, os.ModePerm))
|
||||
tmpDir, err := ioutil.TempDir("", "neogo.restoretest")
|
||||
require.NoError(t, err)
|
||||
t.Cleanup(func() {
|
||||
os.RemoveAll(tmpDir)
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue