-
Notifications
You must be signed in to change notification settings - Fork 122
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
tests: regression tests for types sent over wire as json #1160
Conversation
// AcknowledgePacket is in reference to a packet originally sent from this (consumer) module. | ||
packet := channeltypes.NewPacket( | ||
packetData.GetBytes(), |
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.
Wrong type was previously used in this test. I've adjusted it to use the proper consumer packet data type
@@ -48,11 +50,6 @@ func (mat VSCMaturedPacketData) ValidateBasic() error { | |||
return nil | |||
} | |||
|
|||
func (mat VSCMaturedPacketData) GetBytes() []byte { |
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 and the other GetBytes methods should never be used. VSCMatured and SlashPacket data are both wrapped as ConsumerPacketData when sent over the wire. The ConsumerPacketData.GetBytes() method should be used and is tested in this PR
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.
Thanks!
LGTM!
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
* tests * linting is the most important part of programming --------- Co-authored-by: Marius Poke <[email protected]>
Description
Adds regression tests for the types that are sent over the wire with IBC as JSON bytes. These tests use a hardcoded expected JSON schema that should never change lest we break the wire.
Note I've cherry-picked these tests into
release/v1.0.x
and they pass as expected, woot we haven't broken the wireAuthor Checklist
All items are required. Please add a note to the item if the item is not applicable and
please add links to any relevant follow up issues.
I have...
Reviewers Checklist
All items are required. Please add a note if the item is not applicable and please add
your handle next to the items reviewed if you only reviewed selected items.
I have...