Skip to content

Commit

Permalink
fixing tests
Browse files Browse the repository at this point in the history
  • Loading branch information
spoo-bar committed Mar 28, 2024
1 parent 0006e61 commit 250832e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
3 changes: 3 additions & 0 deletions x/cwica/keeper/ibc_handlers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down
6 changes: 6 additions & 0 deletions x/cwica/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

0 comments on commit 250832e

Please sign in to comment.