Skip to content

Commit

Permalink
fix: test
Browse files Browse the repository at this point in the history
  • Loading branch information
Lockwarr committed Nov 11, 2024
1 parent 2ba0c94 commit 10689fd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions x/contractmanager/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func TestSudo(t *testing.T) {

// success during Sudo
ctx := infCtx.WithGasMeter(types2.NewGasMeter(1_000_000_000_000))
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000})
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000}, nil)
wmKeeper.EXPECT().Sudo(gomock.AssignableToTypeOf(ctx), contractAddress, msg).Do(func(cachedCtx sdk.Context, _ sdk.AccAddress, _ []byte) {
st := cachedCtx.KVStore(storeKey)
st.Set(ShouldBeWrittenKey("sudo"), ShouldBeWritten)
Expand All @@ -51,7 +51,7 @@ func TestSudo(t *testing.T) {

// error during Sudo
ctx = infCtx.WithGasMeter(types2.NewGasMeter(1_000_000_000_000))
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000})
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000}, nil)
cmKeeper.EXPECT().AddContractFailure(ctx, contractAddress.String(), msg, contractmanagerkeeper.RedactError(wasmtypes.ErrExecuteFailed).Error())
wmKeeper.EXPECT().Sudo(gomock.AssignableToTypeOf(ctx), contractAddress, msg).Do(func(cachedCtx sdk.Context, _ sdk.AccAddress, _ []byte) {
st := cachedCtx.KVStore(storeKey)
Expand All @@ -63,7 +63,7 @@ func TestSudo(t *testing.T) {

// ou of gas during Sudo
ctx = infCtx.WithGasMeter(types2.NewGasMeter(1_000_000_000_000))
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000})
cmKeeper.EXPECT().GetParams(ctx).Return(types.Params{SudoCallGasLimit: 10000}, nil)
cmKeeper.EXPECT().AddContractFailure(ctx, contractAddress.String(), msg, contractmanagerkeeper.RedactError(types.ErrSudoOutOfGas).Error())
wmKeeper.EXPECT().Sudo(gomock.AssignableToTypeOf(ctx), contractAddress, msg).Do(func(cachedCtx sdk.Context, _ sdk.AccAddress, _ []byte) {
st := cachedCtx.KVStore(storeKey)
Expand Down

0 comments on commit 10689fd

Please sign in to comment.