replace ResetTestRoot with SetupTestConfiguration in mempool and state

This commit is contained in:
Alessio Treglia
2020-11-30 16:54:11 +00:00
parent 8b094eb6ff
commit ced64e7648
5 changed files with 32 additions and 57 deletions
+1 -3
View File
@@ -2,7 +2,6 @@ package state_test
import (
"fmt"
"os"
"testing"
"github.com/stretchr/testify/assert"
@@ -49,8 +48,7 @@ func TestStoreLoadValidators(t *testing.T) {
func BenchmarkLoadValidators(b *testing.B) {
const valSetSize = 100
config := cfg.ResetTestRoot("state_")
defer os.RemoveAll(config.RootDir)
config := cfg.SetupTestConfiguration(b)
dbType := dbm.BackendType(config.DBBackend)
stateDB, err := dbm.NewDB("state", dbType, config.DBDir())
require.NoError(b, err)