-
Notifications
You must be signed in to change notification settings - Fork 157
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
replace TestHandleSlashPacketDistribution w/ TestSlashUndelegation #633
Conversation
}{ | ||
// infraction - delegate - undelegate - slash - mature consumer - mature provider | ||
// TODO: this behavior is unexpected |
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.
This behavior is unexpected according to my understanding of slashing in Cosmos. Need to discuss with TM team.
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.
Is this already tracked as an issue?
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.
Great work @mpoke. Just a few suggestions to shorten the test length. |
err := so.fn(suite) | ||
suite.Require().NoError(err) | ||
for i, tc := range testCases { | ||
providerKeeper := suite.providerApp.GetProviderKeeper() |
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.
To fully reset the state, we need to call SetupTest on e2e tests that have multiple cases. Otherwise I believe we're using the same store between cases
providerKeeper := suite.providerApp.GetProviderKeeper() | |
suite.SetupTest() | |
providerKeeper := suite.providerApp.GetProviderKeeper() |
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.
Already doing it at the end of the for loop.
}{ | ||
// infraction - delegate - undelegate - slash - mature consumer - mature provider | ||
// TODO: this behavior is unexpected |
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.
Is this already tracked as an issue?
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.
LGTM once the comments are addressed. Great stuff, this test is definitely more intentioned than the previous one
* checkDelegatorBalance refactored out * fix comments
|
Description
TestHandleSlashPacketDistribution
is replaced withTestSlashUndelegation
, which testsLinked issues
Related to #629
Type of change
Testing
: Adds testing