Skip to content

Commit

Permalink
more fixing
Browse files Browse the repository at this point in the history
  • Loading branch information
sontrinh16 committed Dec 2, 2024
1 parent a7ee203 commit af32a94
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions x/accounts/defaults/lockup/lockup_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ import (

"github.com/stretchr/testify/require"

"cosmossdk.io/core/header"
"cosmossdk.io/core/store"
"cosmossdk.io/log"
"cosmossdk.io/math"
lockuptypes "cosmossdk.io/x/accounts/defaults/lockup/v1"

Expand Down Expand Up @@ -229,6 +231,9 @@ func TestTrackingUnDelegation(t *testing.T) {

func TestGetNotBondedLockedCoin(t *testing.T) {
ctx, ss := newMockContext(t)
sdkCtx := sdk.NewContext(nil, true, log.NewNopLogger()).WithContext(ctx).WithHeaderInfo(header.Info{
Time: time.Now(),
})

testcases := []struct {
name string
Expand Down Expand Up @@ -257,10 +262,10 @@ func TestGetNotBondedLockedCoin(t *testing.T) {
}

for _, test := range testcases {
baseLockup := setup(t, ctx, ss)
test.malaete(ctx, baseLockup)
baseLockup := setup(t, sdkCtx, ss)
test.malaete(sdkCtx, baseLockup)

lockedCoin, err := baseLockup.GetNotBondedLockedCoin(ctx, test.lockedCoin, "test")
lockedCoin, err := baseLockup.GetNotBondedLockedCoin(sdkCtx, test.lockedCoin, "test")
require.NoError(t, err)

require.True(t, test.expLockCoin.Equal(lockedCoin), test.name+" locked amount must be equal")
Expand Down

0 comments on commit af32a94

Please sign in to comment.