Skip to content
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

e2e tests aren't checking transaction execution code to determine successful result #2070

Closed
3 tasks
colin-axner opened this issue Aug 22, 2022 · 1 comment
Closed
3 tasks
Labels

Comments

@colin-axner
Copy link
Contributor

Summary

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.

Proposal

Change AssertValidTxResponse to AssertSuccessfulTx (or AssertTxSuccess). Add a line to the function

s.Require().Equal(0, txResp.Code)

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@crodriguezvega
Copy link
Contributor

Proposed change has been implemented in #3475.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants