Skip to content

Commit 227a0b3

Browse files
fix NewTestKeper initialization
1 parent 631a8a1 commit 227a0b3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

x/leverage/keeper/internal_test.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"github.com/cosmos/cosmos-sdk/codec"
55
sdk "github.com/cosmos/cosmos-sdk/types"
66
paramtypes "github.com/cosmos/cosmos-sdk/x/params/types"
7+
"github.com/stretchr/testify/require"
78

89
"github.com/umee-network/umee/v2/x/leverage/types"
910
)
@@ -18,19 +19,21 @@ type TestKeeper struct {
1819
// an additional TestKeeper that exposes normally
1920
// unexported methods for testing.
2021
func NewTestKeeper(
22+
require *require.Assertions,
2123
cdc codec.Codec,
2224
storeKey sdk.StoreKey,
2325
paramSpace paramtypes.Subspace,
2426
bk types.BankKeeper,
2527
ok types.OracleKeeper,
2628
) (Keeper, TestKeeper) {
27-
k := NewKeeper(
29+
k, err := NewKeeper(
2830
cdc,
2931
storeKey,
3032
paramSpace,
3133
bk,
3234
ok,
3335
)
36+
require.NoError(err)
3437
return k, TestKeeper{&k}
3538
}
3639

x/leverage/keeper/keeper_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ func (s *IntegrationTestSuite) SetupTest() {
7676

7777
// we only override the Leverage keeper so we can supply a custom mock oracle
7878
k, tk := keeper.NewTestKeeper(
79+
s.Require(),
7980
app.AppCodec(),
8081
app.GetKey(types.ModuleName),
8182
app.GetSubspace(types.ModuleName),

0 commit comments

Comments
 (0)