Skip to content

Commit

Permalink
revert types/module/module_test.go
Browse files Browse the repository at this point in the history
  • Loading branch information
kocubinski committed Mar 5, 2024
1 parent f127cd4 commit accfd5b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions types/module/module_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"io"
"testing"

appmodulev2 "cosmossdk.io/core/appmodule/v2"
abci "github.com/cometbft/cometbft/abci/types"
"github.com/golang/mock/gomock"
"github.com/spf13/cobra"
Expand Down Expand Up @@ -271,15 +270,15 @@ func TestManager_EndBlock(t *testing.T) {
require.NotNil(t, mm)
require.Equal(t, 3, len(mm.Modules))

mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]appmodulev2.ValidatorUpdate{{}}, nil)
mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil)
mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1)
ret, err := mm.EndBlock(sdk.Context{})
require.NoError(t, err)
require.Equal(t, []abci.ValidatorUpdate{{}}, ret.ValidatorUpdates)

// test panic
mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]appmodulev2.ValidatorUpdate{{}}, nil)
mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]appmodulev2.ValidatorUpdate{{}}, nil)
mockAppModule1.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil)
mockAppModule2.EXPECT().EndBlock(gomock.Any()).Times(1).Return([]abci.ValidatorUpdate{{}}, nil)
_, err = mm.EndBlock(sdk.Context{})
require.Error(t, err)
}
Expand Down

0 comments on commit accfd5b

Please sign in to comment.