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

test: add test cases where contract returns an error #446

Merged
merged 14 commits into from
Jan 21, 2025

Conversation

maximopalopoli
Copy link
Contributor

@maximopalopoli maximopalopoli commented Jan 17, 2025

What Changed?

The initial idea was to test the cases in which the binding response returned an error. I was able to do it only in two cases, in the others, since the chain reader is mainly a getter, it was difficult to get it to return an error. Makes test coverage of chainio/clients/elcontracts/reader.go increase in 1%.

Also in this PR some verifications on binding result are removed, since they only added a little description on the returned error, but the error was extended anyway. The verification removed were those that didn't add context to the error, and those that added context, like those calling permissionController contract were not removed.

Reviewer Checklist

  • Code is well-documented
  • Code adheres to Go naming conventions
  • Code deprecates any old functionality before removing it

@maximopalopoli maximopalopoli marked this pull request as ready for review January 20, 2025 17:41
@maximopalopoli maximopalopoli marked this pull request as draft January 20, 2025 18:11
@maximopalopoli maximopalopoli marked this pull request as ready for review January 20, 2025 18:50
@damiramirez
Copy link
Contributor

LGTM

@pablodeymo pablodeymo added this pull request to the merge queue Jan 21, 2025
Merged via the queue into Layr-Labs:dev with commit a7fce28 Jan 21, 2025
4 checks passed
@pablodeymo pablodeymo deleted the add-contract-error-test-cases branch January 21, 2025 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants