Skip to content

Commit

Permalink
add fund
Browse files Browse the repository at this point in the history
  • Loading branch information
GNaD13 committed Jan 19, 2024
1 parent 6a8d3cc commit e628b52
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion x/multi-staking/keeper/invartiants_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
codectypes "github.com/cosmos/cosmos-sdk/codec/types"

Check failure on line 4 in x/multi-staking/keeper/invartiants_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/ibc-go) --custom-order (gci)
sdk "github.com/cosmos/cosmos-sdk/types"
stakingtypes "github.com/cosmos/cosmos-sdk/x/staking/types"
"github.com/realio-tech/multi-staking-module/testing/simapp"
"github.com/realio-tech/multi-staking-module/testutil"
"github.com/realio-tech/multi-staking-module/x/multi-staking/keeper"

Check failure on line 9 in x/multi-staking/keeper/invartiants_test.go

View workflow job for this annotation

GitHub Actions / lint

File is not `gci`-ed with --skip-generated -s standard -s default -s blank -s dot -s prefix(cosmossdk.io) -s prefix(github.com/cosmos/cosmos-sdk) -s prefix(github.com/cometbft/cometbft) -s prefix(github.com/cosmos/ibc-go) --custom-order (gci)
)
Expand Down Expand Up @@ -31,6 +32,10 @@ func (suite *KeeperTestSuite) TestModuleAccountInvariants() {
{
name: "Success",
malleate: func() {
valCoins := sdk.NewCoins(sdk.NewCoin(MultiStakingDenomA, sdk.NewInt(10000)), sdk.NewCoin(MultiStakingDenomB, sdk.NewInt(10000)))
err := simapp.FundAccount(suite.app, suite.ctx, delAddr, valCoins)
suite.Require().NoError(err)

suite.msKeeper.SetBondWeight(suite.ctx, MultiStakingDenomA, sdk.MustNewDecFromStr("0.3"))
bondAmount := sdk.NewCoin(MultiStakingDenomA, sdk.NewInt(3001))
msg := stakingtypes.MsgCreateValidator{
Expand All @@ -53,7 +58,7 @@ func (suite *KeeperTestSuite) TestModuleAccountInvariants() {
Value: bondAmount,
}

_, err := suite.msgServer.CreateValidator(suite.ctx, &msg)
_, err = suite.msgServer.CreateValidator(suite.ctx, &msg)
suite.Require().NoError(err)
},
expPass: true,
Expand Down
1 change: 1 addition & 0 deletions x/multi-staking/keeper/keeper_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ type KeeperTestSuite struct {
suite.Suite

ctx sdk.Context
app *simapp.SimApp
msKeeper *multistakingkeeper.Keeper
msgServer stakingtypes.MsgServer
}
Expand Down

0 comments on commit e628b52

Please sign in to comment.