Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
lfgtwo authored Dec 13, 2024
2 parents f84b024 + 0d3a7af commit 6b70345
Show file tree
Hide file tree
Showing 7 changed files with 487 additions and 281 deletions.
10 changes: 5 additions & 5 deletions modules/apps/29-fee/ibc_middleware_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1557,28 +1557,28 @@ func (suite *FeeTestSuite) TestAckUnmarshal() {
testCases := []struct {
name string
ackBytes []byte
expPass bool
expError error
}{
{
"success",
[]byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true}`),
true,
nil,
},
{
"failure: unknown fields",
[]byte(`{"app_acknowledgement": "eyJyZXN1bHQiOiJiVzlqYXlCaFkydHViM2RzWldsblpXMWxiblE9In0=", "forward_relayer_address": "relayer", "underlying_app_success": true, "extra_field": "foo"}`),
false,
errors.New("json: unknown field \"extra_field\""),
},
}
for _, tc := range testCases {
suite.Run(tc.name, func() {
ack := &types.IncentivizedAcknowledgement{}
err := json.Unmarshal(tc.ackBytes, ack)

if tc.expPass {
if tc.expError == nil {
suite.Require().NoError(err)
} else {
suite.Require().Error(err)
suite.Require().ErrorContains(err, tc.expError.Error())
}
})
}
Expand Down
Loading

0 comments on commit 6b70345

Please sign in to comment.