Skip to content

Assert specific error codes in failure tests #176

Description

@Glittersup

Summary

Several failure tests assert only that a call failed, not which error was returned. That means a change that swaps one error for another still passes, even though it is a breaking interface change for any client mapping those codes.

Acceptance criteria

  • Failure tests assert the specific StreamError variant returned.
  • No failure test asserts only that an error occurred.
  • The suite still passes.

Getting started

Fork this repository, clone your fork, and add this repo as upstream:

git clone https://github.com/<your-username>/tricklepay-contracts.git
cd tricklepay-contracts
git remote add upstream https://github.com/TricklePay/tricklepay-contracts.git

Create a branch for this issue:

git checkout -b test/issue-176

Suggested commit message:

test: assert specific error codes

Run cargo fmt --check, cargo clippy --all-targets -- -D warnings, and cargo test before opening a pull request and linking this issue.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions