Skip to content

Commit

Permalink
fix: UT
Browse files Browse the repository at this point in the history
  • Loading branch information
BarryTong65 committed Mar 5, 2024
1 parent 4d95969 commit 7109e4b
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 0 additions & 6 deletions x/storage/keeper/keeper.go
Original file line number Diff line number Diff line change
Expand Up @@ -577,12 +577,6 @@ func (k Keeper) CreateObject(
return sdkmath.ZeroUint(), err
}

// check object
//_, found = k.GetObjectInfo(ctx, bucketName, objectName)
//if found {
// return sdkmath.ZeroUint(), types.ErrObjectAlreadyExists
//}

// primary sp
sp := k.MustGetPrimarySPForBucket(ctx, bucketInfo)

Expand Down
6 changes: 5 additions & 1 deletion x/storage/keeper/payment_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import (
moduletestutil "github.com/cosmos/cosmos-sdk/types/module/testutil"
authtypes "github.com/cosmos/cosmos-sdk/x/auth/types"
govtypes "github.com/cosmos/cosmos-sdk/x/gov/types"
upgradetypes "github.com/cosmos/cosmos-sdk/x/upgrade/types"
"github.com/golang/mock/gomock"
"github.com/stretchr/testify/suite"

Expand Down Expand Up @@ -48,8 +49,11 @@ func (s *TestSuite) SetupTest() {
testCtx := testutil.DefaultContextWithDB(s.T(), key, storetypes.NewTransientStoreKey("transient_test"))
header := testCtx.Ctx.BlockHeader()
header.Time = time.Now()
upgradeChecker := func(ctx sdk.Context, name string) bool {
return name == upgradetypes.Pawnee
}
testCtx = testutil.TestContext{
Ctx: sdk.NewContext(testCtx.CMS, header, false, nil, testCtx.Ctx.Logger()),
Ctx: sdk.NewContext(testCtx.CMS, header, false, upgradeChecker, testCtx.Ctx.Logger()),
DB: testCtx.DB,
CMS: testCtx.CMS,
}
Expand Down

0 comments on commit 7109e4b

Please sign in to comment.