From 8c0cb25babb1b73761e8a0b3a237e1da2853b814 Mon Sep 17 00:00:00 2001 From: Christopher Goes Date: Thu, 5 Apr 2018 11:21:42 +0200 Subject: [PATCH] Update for new context --- server/start_test.go | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/server/start_test.go b/server/start_test.go index 40f7a0aab..ec6c886b1 100644 --- a/server/start_test.go +++ b/server/start_test.go @@ -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