-
Notifications
You must be signed in to change notification settings - Fork 629
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
e2e: fee middleware with multiple incentivisers #2073
Conversation
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.
Looks great! Just had a few small suggestions. 👍
actualFee1 := packets[0].PacketFees[0].Fee | ||
actualFee2 := packets[0].PacketFees[1].Fee |
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.
maybe we can add an assertion that s.Require().Len(packets[0].PacketFees, 2)
?
e2e/fee_middleware_test.go
Outdated
actualBalance1, err := s.GetChainANativeBalance(ctx, chainAWallet1) | ||
s.Require().NoError(err) | ||
|
||
expected1 := testvalues.StartingTokenAmount - walletAmount1.Amount - testFee.Total().AmountOf(chainADenom).Int64() | ||
s.Require().Equal(expected1, actualBalance1) | ||
|
||
actualBalance2, err := s.GetChainANativeBalance(ctx, chainAWallet2) | ||
s.Require().NoError(err) | ||
|
||
expected2 := testvalues.StartingTokenAmount - testFee.Total().AmountOf(chainADenom).Int64() | ||
s.Require().Equal(expected2, actualBalance2) |
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 might be worth splitting these up into two separate subtests, in the output of a test failure we would need to rely on line number to know which balance was incorrect.
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.
Nice work! LGTM
Description
closes: #1684
Before we can merge this PR, please make sure that all the following items have been
checked off. If any of the checklist items are not applicable, please leave them but
write a little note why.
docs/
) or specification (x/<module>/spec/
)godoc
comments.Unreleased
section inCHANGELOG.md
Files changed
in the Github PR explorerCodecov Report
in the comment section below once CI passes