-
Notifications
You must be signed in to change notification settings - Fork 620
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
Events unit testing across the board #2823
Comments
Thanks @Anmol1696. I like the addition 👍 We can add the function into the ibc testing package. @damiannolan @chatton what do y'all think?
This makes sense. Given that changing the key value would likely be very disruptive to external users and thus should rarely change |
Sorry for the hurry, but can this PR: #2829 be reviewd? So i can then open all the small PRs for various parts of the code. This PR has the main function needed, after which we can have parallel PRs, they can be reviewd slowly. From what i can tell there will be these PRs
|
We had a regression in event behaviour (v5.2, v6.1, v7+) for no-op relays which affected hermes which shows that increased event testing would have been useful in being aware of the issue before it reaches production code Would be nice if we could split up this issue and prioritize some of its work over the months cc @crodriguezvega |
Summary
Currently there is no tests for events emitted by any of the msgs. The following proposal is a way to have easy testablity in unit tests for events emitted per msg.
Problem Definition
Why do we need this feature?
What benefits does the ibc-go stand to gain by including this feature?
Are there any disadvantages of including this feature?
Proposal
The proposal is to add a testutil function which can assert events.
To make this function importable, I propose we create a new package
testutil
at the root level, where we can have multiple test utils that can then be imported. Something liketestutil
. package incosmos-sdk
In the test functions where the events are emmited we can call the above function as:
Points of disucssion
assertEvents
function an importable function which can be used by various functions. Creating a new package might be an overkill, but can go a long way in the future to have common test utils.PRs
app/transfer
- imp: event assertion tests function #282904-channel
- Event tests assertion for 04-channel #283003-connection
Add event testing for connection handshake #568202-client
Add testing for client events #5686apps/27-ica
Add testing for ICA events #5687apps/29-fee
Add tests for fee events #5706For Admin Use
The text was updated successfully, but these errors were encountered: