Skip to content

e2e: Replace AssertValidTxResponse and error check with AssertSuccessTx or AssertFailedTx #3435

Closed
@colin-axner

Description

Summary

Instead of asserting that a response from broadcasting a tx is not nil, we should immediately fail if it is nil and provide helper functions to see if the tx was successful or not. See comment:

Instead of:

    transferTxResp, err := s.Transfer(args)
    s.Require().NoError(err)
    s.AssertValidTxResponse(transferTxResp)

use

    resp := s.Transfer(args)
    s.AssertTxSuccess(resp)

or

    resp := s.Transfer(args)
    s.AssertTxFailure(resp, transfertypes.ErrInsufficientBalance) // expected error code 

For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned

Metadata

Assignees

Labels

e2eneeds discussionIssues that need discussion before they can be worked ontype: code hygieneClean up code but without changing functionality or interfaces

Type

No type

Projects

  • Status

    Done 🥳

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions