-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
refactor: writing test case for module account incentivizing packet #1397
Changes from 1 commit
56d565d
9b3f30d
0a9beff
4f02f66
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ package keeper_test | |
import ( | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
|
||
disttypes "github.com/cosmos/cosmos-sdk/x/distribution/types" | ||
"github.com/cosmos/ibc-go/v3/modules/apps/29-fee/types" | ||
clienttypes "github.com/cosmos/ibc-go/v3/modules/core/02-client/types" | ||
channeltypes "github.com/cosmos/ibc-go/v3/modules/core/04-channel/types" | ||
|
@@ -76,6 +77,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { | |
expEscrowBalance sdk.Coins | ||
expFeesInEscrow []types.PacketFee | ||
msg *types.MsgPayPacketFee | ||
fee types.Fee | ||
) | ||
|
||
testCases := []struct { | ||
|
@@ -106,6 +108,15 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { | |
}, | ||
true, | ||
}, | ||
{ | ||
"refund account is module account", | ||
func() { | ||
msg.Signer = suite.chainA.GetSimApp().AccountKeeper.GetModuleAddress(disttypes.ModuleName).String() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we can maybe remove this test case now? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is it worth keeping this in, and just change There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I agree. It's worth keeping it. |
||
expPacketFee := types.NewPacketFee(fee, msg.Signer, nil) | ||
expFeesInEscrow = []types.PacketFee{expPacketFee} | ||
}, | ||
true, | ||
}, | ||
{ | ||
"fee module is locked", | ||
func() { | ||
|
@@ -165,7 +176,7 @@ func (suite *KeeperTestSuite) TestPayPacketFee() { | |
suite.SetupTest() | ||
suite.coordinator.Setup(suite.path) // setup channel | ||
|
||
fee := types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) | ||
fee = types.NewFee(defaultRecvFee, defaultAckFee, defaultTimeoutFee) | ||
msg = types.NewMsgPayPacketFee( | ||
fee, | ||
suite.path.EndpointA.ChannelConfig.PortID, | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking at it now, it might make more sense to put this in the escrow test suite
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it'd be nice if there was a test for distributing to a module acc