-
Notifications
You must be signed in to change notification settings - Fork 19
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
Diff denom keeper tests #96
Conversation
x/airdrop/keeper/keeper_test.go
Outdated
@@ -164,6 +166,84 @@ func (s *KeeperTestSuite) TestFeeDrip() { | |||
s.Require().Equal(feeCollectorBalance, sdk.NewCoin(sdk.DefaultBondDenom, sdk.NewInt(4040))) | |||
} | |||
|
|||
func (s *KeeperTestSuite) TestAddNewFundWithDiffDenom() { | |||
amount := sdk.NewInt64Coin("afet", 4000) |
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.
I'd vote for using another denom that afet
here. This is test and can be anything really, no need to create any confusion with prod tokens.
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.
Yep, good call - let me know what you think of "denom" as a placeholder
x/airdrop/keeper/keeper_test.go
Outdated
} | ||
|
||
func (s *KeeperTestSuite) TestMultiDenomFeeDrip() { | ||
amount_stake := sdk.NewInt64Coin(sdk.DefaultBondDenom, 4000) |
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.
on variable naming, go uses camelCase only.
Codecov Report
@@ Coverage Diff @@
## master #96 +/- ##
==========================================
+ Coverage 61.99% 63.01% +1.01%
==========================================
Files 622 624 +2
Lines 35762 41382 +5620
==========================================
+ Hits 22170 26076 +3906
- Misses 11239 12910 +1671
- Partials 2353 2396 +43
|
x/airdrop/keeper/keeper_test.go
Outdated
|
||
fund2 := types.Fund{ | ||
Amount: &amountStake, | ||
DripAmount: sdk.NewInt(4000), // will only last one block |
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 would be a slightly better test if we didn't use the same 4000 40 combination but mixed it up a little
Sorry guys - my mistake! Accidentally pushed to this before merging and pushing to a new branch |
1c84c0b
to
9e1c039
Compare
Added test fund with afet
Added test drip with stake and afet