Finished testnet command and introduced localnet targets in Makefile, together with gaiadnode Docker image Fixed function parameter list - now starts with ctx Separated GenTxConfig into a server/config package so both the server package and the mock package can use it Adding server/config to app package gaiadnode Docker image Separated GenTxConfig into a server/config package so both the server package and the mock package can use it Adding server/config to app package Fixes requested by Rigel Removed commented code Global flag fixes
48 lines
855 B
Go
48 lines
855 B
Go
package server
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/require"
|
|
|
|
"github.com/tendermint/tmlibs/log"
|
|
|
|
"github.com/cosmos/cosmos-sdk/server/mock"
|
|
"github.com/cosmos/cosmos-sdk/wire"
|
|
tcmd "github.com/tendermint/tendermint/cmd/tendermint/commands"
|
|
)
|
|
|
|
// TODO update
|
|
func TestInitCmd(t *testing.T) {
|
|
defer setupViper(t)()
|
|
|
|
logger := log.NewNopLogger()
|
|
cfg, err := tcmd.ParseConfig()
|
|
require.Nil(t, err)
|
|
ctx := NewContext(cfg, logger)
|
|
cdc := wire.NewCodec()
|
|
appInit := AppInit{
|
|
AppGenState: mock.AppGenState,
|
|
AppGenTx: mock.AppGenTx,
|
|
}
|
|
cmd := InitCmd(ctx, cdc, appInit)
|
|
err = cmd.RunE(nil, nil)
|
|
require.NoError(t, err)
|
|
}
|
|
|
|
func TestGenTxCmd(t *testing.T) {
|
|
// TODO
|
|
}
|
|
|
|
func TestTestnetFilesCmd(t *testing.T) {
|
|
// TODO
|
|
}
|
|
|
|
func TestSimpleAppGenTx(t *testing.T) {
|
|
// TODO
|
|
}
|
|
|
|
func TestSimpleAppGenState(t *testing.T) {
|
|
// TODO
|
|
}
|