From 250832ede360c21d95c27ef8051903c03be11d4e Mon Sep 17 00:00:00 2001 From: Spoorthi Satheesha <9302666+spoo-bar@users.noreply.github.com> Date: Thu, 28 Mar 2024 21:16:28 +0530 Subject: [PATCH] fixing tests --- x/cwica/keeper/ibc_handlers_test.go | 3 +++ x/cwica/keeper/keeper.go | 6 ++++++ 2 files changed, 9 insertions(+) diff --git a/x/cwica/keeper/ibc_handlers_test.go b/x/cwica/keeper/ibc_handlers_test.go index 5d3e21c5..ebda9519 100644 --- a/x/cwica/keeper/ibc_handlers_test.go +++ b/x/cwica/keeper/ibc_handlers_test.go @@ -59,9 +59,12 @@ func (s *KeeperTestSuite) TestHandleAcknowledgement() { func (s *KeeperTestSuite) TestHandleTimeout() { ctx, cwicaKeeper := s.chain.GetContext().WithBlockHeight(100).WithGasMeter(sdk.NewGasMeter(1_000_000_000_000)), s.chain.GetApp().Keepers.CWICAKeeper wmKeeper, icaCtrlKeeper, channelKeeper := testutils.NewMockContractViewer(), testutils.NewMockICAControllerKeeper(), testutils.NewMockChannelKeeper() + errorsKeeper := s.chain.GetApp().Keepers.CWErrorsKeeper + errorsKeeper.SetWasmKeeper(wmKeeper) cwicaKeeper.SetWasmKeeper(wmKeeper) cwicaKeeper.SetICAControllerKeeper(icaCtrlKeeper) cwicaKeeper.SetChannelKeeper(channelKeeper) + cwicaKeeper.SetErrorsKeeper(errorsKeeper) contractAddress := e2eTesting.GenContractAddresses(1)[0] contractAdminAcc := s.chain.GetAccount(0) wmKeeper.AddContractAdmin( diff --git a/x/cwica/keeper/keeper.go b/x/cwica/keeper/keeper.go index 85d21218..22956820 100644 --- a/x/cwica/keeper/keeper.go +++ b/x/cwica/keeper/keeper.go @@ -78,3 +78,9 @@ func (k *Keeper) SetChannelKeeper(ck types.ChannelKeeper) { func (k *Keeper) SetConnectionKeeper(ck types.ConnectionKeeper) { k.connectionKeeper = ck } + +// SetErrorsKeeper sets the given errors keeper. +// NOTE: Only for testing purposes +func (k *Keeper) SetErrorsKeeper(ek types.ErrorsKeeper) { + k.errorsKeeper = ek +}