Skip to content

Commit

Permalink
Merge branch 'main' into marko/gomod_change
Browse files Browse the repository at this point in the history
  • Loading branch information
damiannolan authored Dec 12, 2024
2 parents d20e48f + 0d3a7af commit e37253f
Showing 1 changed file with 5 additions and 5 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

0 comments on commit e37253f

Please sign in to comment.