fix: stop creating data folder when running tests (#14152)
This commit is contained in:
parent
390262f56b
commit
605ea666c6
@ -2,6 +2,8 @@ package simapp
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"os"
|
||||
"testing"
|
||||
|
||||
"github.com/stretchr/testify/require"
|
||||
@ -229,7 +231,13 @@ func ModuleAccountAddrs() map[string]bool {
|
||||
|
||||
// NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests
|
||||
func NewTestNetworkFixture() network.TestFixture {
|
||||
app := NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.EmptyAppOptions{})
|
||||
dir, err := os.MkdirTemp("", "simapp")
|
||||
if err != nil {
|
||||
panic(fmt.Sprintf("failed creating temporary directory: %v", err))
|
||||
}
|
||||
defer os.RemoveAll(dir)
|
||||
|
||||
app := NewSimApp(log.NewNopLogger(), dbm.NewMemDB(), nil, true, simtestutil.NewAppOptionsWithFlagHome(dir))
|
||||
|
||||
appCtr := func(val testutil.Validator) servertypes.Application {
|
||||
return NewSimApp(
|
||||
|
||||
Loading…
Reference in New Issue
Block a user