Some message validation conditions and types are not tested on the IBC implementation.
/types package within the x/ibc modulesuite (only in the case of the keepers and when the test use common types).TODO add tests:
x/ibc/04-channel/keeper/packet.gox/ibc/04-channel/keeper/timeout.goAs we discussed I can work on it. So I guess I have to work against the ibc-alpha branch. I found a types package inside, but it has only few lines of code, so I think I have to write test for the sub-packages what number prefixed.
@fedekunze I don't see how but the errors.Is() doesn't work properly in case of sdkerrors.Wrap().
So I called for MsgCreateClient#ValidateBasic with the ClientType = "bad_type". It returns an error to me: invalid client type: bad_type.
The line compose this error is: return sdkerrors.Wrap(errors.ErrInvalidClientType, msg.ClientType)
In the test case I want to test for errors.Is(err, errs.ErrInvalidClientType) (I renamed that to have the built-in error package) but I get false for that. In other error returns where it doesn't have the sdkerrors.Wrap(), I can use the errors.Is() case properly.
Is that an issue, or I just missed something?
@PumpkinSeed can you open an issue? I personally haven’t used that function in a while. We can look into it tomorrow