diff --git a/baseapp/abci_test.go b/baseapp/abci_test.go index b6027102d98b..7e513ff4ed31 100644 --- a/baseapp/abci_test.go +++ b/baseapp/abci_test.go @@ -77,7 +77,7 @@ func TestABCI_First_block_Height(t *testing.T) { func TestABCI_InitChain(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() app := baseapp.NewBaseApp(name, logger, db, nil, baseapp.SetChainID("test-chain-id")) capKey := storetypes.NewKVStoreKey("main") @@ -179,7 +179,7 @@ func TestABCI_InitChain(t *testing.T) { func TestABCI_InitChain_WithInitialHeight(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) _, err := app.InitChain( &abci.RequestInitChain{ @@ -196,7 +196,7 @@ func TestABCI_InitChain_WithInitialHeight(t *testing.T) { func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) _, err := app.InitChain( &abci.RequestInitChain{ @@ -219,7 +219,7 @@ func TestABCI_FinalizeBlock_WithInitialHeight(t *testing.T) { func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) app.SetBeginBlocker(func(ctx sdk.Context) (sdk.BeginBlock, error) { return sdk.BeginBlock{ @@ -286,7 +286,7 @@ func TestABCI_FinalizeBlock_WithBeginAndEndBlocker(t *testing.T) { func TestABCI_ExtendVote(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) app.SetExtendVoteHandler(func(ctx sdk.Context, req *abci.RequestExtendVote) (*abci.ResponseExtendVote, error) { voteExt := "foo" + hex.EncodeToString(req.Hash) + strconv.FormatInt(req.Height, 10) @@ -369,7 +369,7 @@ func TestABCI_ExtendVote(t *testing.T) { func TestABCI_OnlyVerifyVoteExtension(t *testing.T) { name := t.Name() db := dbm.NewMemDB() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) app.SetVerifyVoteExtensionHandler(func(ctx sdk.Context, req *abci.RequestVerifyVoteExtension) (*abci.ResponseVerifyVoteExtension, error) { // do some kind of verification here @@ -502,7 +502,7 @@ func TestABCI_P2PQuery(t *testing.T) { func TestBaseApp_PrepareCheckState(t *testing.T) { db := dbm.NewMemDB() name := t.Name() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() cp := &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ @@ -531,7 +531,7 @@ func TestBaseApp_PrepareCheckState(t *testing.T) { func TestBaseApp_Precommit(t *testing.T) { db := dbm.NewMemDB() name := t.Name() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() cp := &cmtproto.ConsensusParams{ Block: &cmtproto.BlockParams{ @@ -1234,7 +1234,7 @@ func TestABCI_Query(t *testing.T) { } func TestABCI_GetBlockRetentionHeight(t *testing.T) { - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() db := dbm.NewMemDB() name := t.Name() @@ -1347,7 +1347,7 @@ func TestABCI_GetBlockRetentionHeight(t *testing.T) { func TestPrepareCheckStateCalledWithCheckState(t *testing.T) { t.Parallel() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() db := dbm.NewMemDB() name := t.Name() app := baseapp.NewBaseApp(name, logger, db, nil) @@ -1370,7 +1370,7 @@ func TestPrepareCheckStateCalledWithCheckState(t *testing.T) { func TestPrecommiterCalledWithDeliverState(t *testing.T) { t.Parallel() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() db := dbm.NewMemDB() name := t.Name() app := baseapp.NewBaseApp(name, logger, db, nil) @@ -2004,7 +2004,7 @@ func TestABCI_HaltChain(t *testing.T) { func TestBaseApp_PreFinalizeBlockHook(t *testing.T) { db := dbm.NewMemDB() name := t.Name() - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() app := baseapp.NewBaseApp(name, logger, db, nil) _, err := app.InitChain(&abci.RequestInitChain{}) diff --git a/baseapp/baseapp_test.go b/baseapp/baseapp_test.go index 09c76c5e9bfb..7706104f1677 100644 --- a/baseapp/baseapp_test.go +++ b/baseapp/baseapp_test.go @@ -65,7 +65,7 @@ func NewBaseAppSuite(t *testing.T, opts ...func(*baseapp.BaseApp)) *BaseAppSuite txConfig := authtx.NewTxConfig(cdc, authtx.DefaultSignModes) db := dbm.NewMemDB() - app := baseapp.NewBaseApp(t.Name(), log.NewTestLogger(t), db, txConfig.TxDecoder(), opts...) + app := baseapp.NewBaseApp(t.Name(), log.NewNopLogger(), db, txConfig.TxDecoder(), opts...) require.Equal(t, t.Name(), app.Name()) app.SetInterfaceRegistry(cdc.InterfaceRegistry()) @@ -90,7 +90,7 @@ func getQueryBaseapp(t *testing.T) *baseapp.BaseApp { db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) require.NoError(t, err) @@ -189,7 +189,7 @@ func NewBaseAppSuiteWithSnapshots(t *testing.T, cfg SnapshotsConfig, opts ...fun } func TestLoadVersion(t *testing.T) { - logger := log.NewTestLogger(t) + logger := log.NewNopLogger() pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningNothing)) db := dbm.NewMemDB() name := t.Name() @@ -318,7 +318,7 @@ func TestSetLoader(t *testing.T) { if tc.setLoader != nil { opts = append(opts, tc.setLoader) } - app := baseapp.NewBaseApp(t.Name(), log.NewTestLogger(t), db, nil, opts...) + app := baseapp.NewBaseApp(t.Name(), log.NewNopLogger(), db, nil, opts...) app.MountStores(storetypes.NewKVStoreKey(tc.loadStoreKey)) err := app.LoadLatestVersion() require.Nil(t, err) @@ -341,7 +341,7 @@ func TestVersionSetterGetter(t *testing.T) { pruningOpt := baseapp.SetPruning(pruningtypes.NewPruningOptions(pruningtypes.PruningDefault)) db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil, pruningOpt) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil, pruningOpt) require.Equal(t, "", app.Version()) res, err := app.Query(context.TODO(), &abci.RequestQuery{Path: "app/version"}) @@ -400,7 +400,7 @@ func TestOptionFunction(t *testing.T) { } db := dbm.NewMemDB() - bap := baseapp.NewBaseApp("starting name", log.NewTestLogger(t), db, nil, testChangeNameHelper("new name")) + bap := baseapp.NewBaseApp("starting name", log.NewNopLogger(), db, nil, testChangeNameHelper("new name")) require.Equal(t, bap.Name(), "new name", "BaseApp should have had name changed via option function") } @@ -590,7 +590,7 @@ func TestABCI_CreateQueryContext(t *testing.T) { db := dbm.NewMemDB() name := t.Name() - app := baseapp.NewBaseApp(name, log.NewTestLogger(t), db, nil) + app := baseapp.NewBaseApp(name, log.NewNopLogger(), db, nil) _, err := app.FinalizeBlock(&abci.RequestFinalizeBlock{Height: 1}) require.NoError(t, err) diff --git a/baseapp/grpcrouter_test.go b/baseapp/grpcrouter_test.go index b98231b65302..8816e156dc0f 100644 --- a/baseapp/grpcrouter_test.go +++ b/baseapp/grpcrouter_test.go @@ -59,7 +59,7 @@ func TestRegisterQueryServiceTwice(t *testing.T) { err := depinject.Inject( depinject.Configs( makeMinimalConfig(), - depinject.Supply(log.NewTestLogger(t)), + depinject.Supply(log.NewNopLogger()), ), &appBuilder) require.NoError(t, err) diff --git a/baseapp/msg_service_router_test.go b/baseapp/msg_service_router_test.go index 23acbe99409b..a9b5cd161379 100644 --- a/baseapp/msg_service_router_test.go +++ b/baseapp/msg_service_router_test.go @@ -30,7 +30,7 @@ func TestRegisterMsgService(t *testing.T) { err := depinject.Inject( depinject.Configs( makeMinimalConfig(), - depinject.Supply(log.NewTestLogger(t)), + depinject.Supply(log.NewNopLogger()), ), &appBuilder, ®istry) require.NoError(t, err) app := appBuilder.Build(dbm.NewMemDB(), nil) @@ -62,7 +62,7 @@ func TestRegisterMsgServiceTwice(t *testing.T) { err := depinject.Inject( depinject.Configs( makeMinimalConfig(), - depinject.Supply(log.NewTestLogger(t)), + depinject.Supply(log.NewNopLogger()), ), &appBuilder, ®istry) require.NoError(t, err) db := dbm.NewMemDB()