-
Notifications
You must be signed in to change notification settings - Fork 321
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
test: add integration test for the ibc tokenfilter #1474
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.
Overall LGTM. No blocking feedback
testing/tokenfilter/setup.go
Outdated
|
||
txConfig := app.GetTxConfig() | ||
|
||
// create an account to send transactions from |
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.
[question] I'm not sure how this comment is applicable to the line below. Should the comment be moved?
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.
Yeah I can cut it out. This entire setup.go page is copy pasted from IBC's testing framework just FYI. Predominantly because our staking.Validator
requires an EvmAddress
.
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.
we have a lot of things in testuil, but I think the testing package makes more sense name wise for some of the things in testutil, so we might want to move some things over to testing
after merging this.
ibc's testing suite is really cool!! mentioned this PR in #829, as there might be something that we can consolidate in the future with the testnode
package, but I would need to take a much deeper look.
|
||
// SetupWithGenesisValSet initializes a new SimApp with a validator set and genesis accounts | ||
// that also act as delegators. For simplicity, each validator is bonded with a delegation | ||
// of one consensus engine unit (10^6) in the default token of the simapp from first genesis |
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.
[non blocking question]
For simplicity, each validator is bonded with a delegation
// of one consensus engine unit (10^6)
does this depend on the power reduction passed?
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 think so. Honestly I'm not sure. I didn't write it and it doesn't really affect the test
Closes: #1249
I first explored using interchaintest which similar to testground spun up all necessary infra using docker containers and then exposed some go APIs for executing IBC messages and making assertions. I unfortunately, came across several problems owing to the fact that celestia has made several changes to the cosmos-sdk that interchain test bases assumptions on.
I switched tack, and instead looked at using ibc's own testing framework. There were a few similar complications before (i.e. it's difficult to inject a custom app) but I managed to overcome them and have put together a test suite under
testing/tokenfilter
that does the following: