Add test which fails without patch, comment on patch

This commit is contained in:
Jeremiah Andrews
2018-07-25 22:13:58 -07:00
parent 6ea0a1b66f
commit 0166cf2aa0
2 changed files with 18 additions and 0 deletions
+17
View File
@@ -1,9 +1,15 @@
package app
import (
"os"
"testing"
"github.com/cosmos/cosmos-sdk/wire"
"github.com/cosmos/cosmos-sdk/x/auth"
"github.com/cosmos/cosmos-sdk/x/stake"
"github.com/stretchr/testify/require"
"github.com/tendermint/tendermint/libs/db"
"github.com/tendermint/tendermint/libs/log"
abci "github.com/tendermint/tendermint/abci/types"
)
@@ -31,3 +37,14 @@ func setGenesis(gapp *GaiaApp, accs ...*auth.BaseAccount) error {
return nil
}
func TestGaiadExport(t *testing.T) {
db := db.NewMemDB()
gapp := NewGaiaApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil)
setGenesis(gapp)
// Making a new app object with the db, so that initchain hasn't been called
newGapp := NewGaiaApp(log.NewTMLogger(log.NewSyncWriter(os.Stdout)), db, nil)
_, _, err := newGapp.ExportAppStateAndValidators()
require.NoError(t, err, "ExportAppStateAndValidators should not have an error")
}