2018-02-21 07:04:54 -08:00
|
|
|
package server
|
|
|
|
|
2018-02-21 07:41:56 -08:00
|
|
|
import (
|
|
|
|
"testing"
|
|
|
|
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
|
2018-07-02 13:34:06 -07:00
|
|
|
"github.com/tendermint/tendermint/libs/log"
|
2018-02-21 07:41:56 -08:00
|
|
|
|
2018-06-07 21:33:06 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/server/mock"
|
2018-04-23 12:15:50 -07:00
|
|
|
"github.com/cosmos/cosmos-sdk/wire"
|
2018-04-04 04:39:13 -07:00
|
|
|
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
|
2018-02-21 07:41:56 -08:00
|
|
|
)
|
|
|
|
|
2018-04-25 21:49:53 -07:00
|
|
|
// TODO update
|
|
|
|
func TestInitCmd(t *testing.T) {
|
2018-03-09 10:36:24 -08:00
|
|
|
defer setupViper(t)()
|
2018-02-21 07:04:54 -08:00
|
|
|
|
2018-02-21 07:41:56 -08:00
|
|
|
logger := log.NewNopLogger()
|
2018-04-04 04:39:13 -07:00
|
|
|
cfg, err := tcmd.ParseConfig()
|
|
|
|
require.Nil(t, err)
|
|
|
|
ctx := NewContext(cfg, logger)
|
2018-04-23 12:15:50 -07:00
|
|
|
cdc := wire.NewCodec()
|
2018-04-23 17:05:58 -07:00
|
|
|
appInit := AppInit{
|
2018-04-25 13:12:14 -07:00
|
|
|
AppGenState: mock.AppGenState,
|
|
|
|
AppGenTx: mock.AppGenTx,
|
2018-04-23 17:05:58 -07:00
|
|
|
}
|
|
|
|
cmd := InitCmd(ctx, cdc, appInit)
|
2018-04-04 04:39:13 -07:00
|
|
|
err = cmd.RunE(nil, nil)
|
2018-02-21 07:41:56 -08:00
|
|
|
require.NoError(t, err)
|
2018-02-21 07:04:54 -08:00
|
|
|
}
|
2018-04-25 21:49:53 -07:00
|
|
|
|
|
|
|
func TestGenTxCmd(t *testing.T) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2018-06-05 12:17:04 -07:00
|
|
|
func TestTestnetFilesCmd(t *testing.T) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
2018-04-25 21:49:53 -07:00
|
|
|
func TestSimpleAppGenTx(t *testing.T) {
|
|
|
|
// TODO
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestSimpleAppGenState(t *testing.T) {
|
|
|
|
// TODO
|
|
|
|
}
|