(cherry picked from commit 605ea666c6d04d70ab990fbb169b6f09c400e8a9) Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
eb217576db
commit
3bb3661ced
|
@ -2,6 +2,8 @@ package simapp
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
|
"fmt"
|
||||||
|
"os"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
"github.com/stretchr/testify/require"
|
"github.com/stretchr/testify/require"
|
||||||
|
@ -229,7 +231,13 @@ func ModuleAccountAddrs() map[string]bool {
|
||||||
|
|
||||||
// NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests
|
// NewTestNetworkFixture returns a new simapp AppConstructor for network simulation tests
|
||||||
func NewTestNetworkFixture() network.TestFixture {
|
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 {
|
appCtr := func(val testutil.Validator) servertypes.Application {
|
||||||
return NewSimApp(
|
return NewSimApp(
|
||||||
|
|
Loading…
Reference in New Issue