Update for new context

This commit is contained in:
Christopher Goes 2018-04-05 11:21:42 +02:00
parent 74a2246b3e
commit 8c0cb25bab
No known key found for this signature in database
GPG Key ID: E828D98232D328D3
1 changed files with 6 additions and 3 deletions

View File

@ -48,13 +48,16 @@ func TestStartWithTendermint(t *testing.T) {
logger := log.NewTMLogger(log.NewSyncWriter(os.Stdout)).
With("module", "mock-cmd")
initCmd := InitCmd(mock.GenInitOptions, logger)
err := initCmd.RunE(nil, nil)
cfg, err := tcmd.ParseConfig()
require.Nil(t, err)
ctx := NewContext(cfg, logger)
initCmd := InitCmd(mock.GenInitOptions, ctx)
err = initCmd.RunE(nil, nil)
require.NoError(t, err)
// set up app and start up
viper.Set(flagWithTendermint, true)
startCmd := StartCmd(mock.NewApp, logger)
startCmd := StartCmd(mock.NewApp, ctx)
startCmd.Flags().Set(flagAddress, FreeTCPAddr(t)) // set to a new free address
timeout := time.Duration(5) * time.Second