We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
While working on governance proposal submission tests I realized it was possible to have a failed transaction which returned no error. So:
txResp, err := s.BroadcastMessages(msg) // message fails s.Require().NoError(err) // this check pass s.Require().AssertValidTxResponse(txResp) // fails on empty events
The message is broadcasted but errors in the state machine so the transaction code != 0. Our code isn't really explicitly checking this.
Change AssertValidTxResponse to AssertSuccessfulTx (or AssertTxSuccess). Add a line to the function
AssertValidTxResponse
AssertSuccessfulTx
AssertTxSuccess
s.Require().Equal(0, txResp.Code)
The text was updated successfully, but these errors were encountered:
Proposed change has been implemented in #3475.
Sorry, something went wrong.
No branches or pull requests
Summary
While working on governance proposal submission tests I realized it was possible to have a failed transaction which returned no error. So:
The message is broadcasted but errors in the state machine so the transaction code != 0. Our code isn't really explicitly checking this.
Proposal
Change
AssertValidTxResponse
toAssertSuccessfulTx
(orAssertTxSuccess
). Add a line to the functionFor Admin Use
The text was updated successfully, but these errors were encountered: