Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
imp: event assertion tests function #2829
imp: event assertion tests function #2829
Changes from 6 commits
3267c7a
126b73e
517d006
3ce88e0
489d184
c5588ea
d861ce3
f507ef7
9991a42
4283fd6
c616dae
9d319fe
f5a47e8
3c46d8d
360646a
0a7a042
54c2110
1585467
3cc23c4
7ee6b8b
966eb13
a6da8c6
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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 there a reason to use
map[string]map[string]string
as opposed to taking ansdk.Events
directly?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.
Just wanted the map of expected events being readable as a map for the test itself.
We can change this to
sdk.Events
as well, but i chose readability of expected events. Do you think we should change it?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.
Ah I see, I'm happy with it as a map, I was just curious as to why a different type was used. 👍
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.
Cool, this snipet is the reason, to me this just makes intutive sense of what to expect from the event. https://github.com/cosmos/ibc-go/pull/2829/files#diff-ae66bd29b0c68b16e3fc64fb2d8c88dcc90ef4ed6c1f67be36baf8d693473f8eR150-R156
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.
Would it be possible though to make a type definition for
map[string]map[string]string
just to improve readability? LikeeventsMap
or something like that? Something that signals the purpose of the type more clearly than the mouthful ofmap[string]map[string]string
. :)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.
makes sense will do