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 the test case for invalid address #88

Merged
merged 29 commits into from
Aug 23, 2023

Conversation

Kynea0b
Copy link

@Kynea0b Kynea0b commented Aug 20, 2023

Description

Added an error test when specifying an invalid address

Checklist:

  • I followed the contributing guidelines and code of conduct.
  • I have added a relevant changelog to CHANGELOG.md
  • I have added tests to cover my changes.
  • I have updated the documentation accordingly. (not needed)
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml (not needed)

@Kynea0b Kynea0b self-assigned this Aug 20, 2023
@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #88 (d4c7dfc) into main (00c6a22) will increase coverage by 0.12%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #88      +/-   ##
==========================================
+ Coverage   63.25%   63.37%   +0.12%     
==========================================
  Files          80       80              
  Lines        9994     9994              
==========================================
+ Hits         6322     6334      +12     
+ Misses       3345     3337       -8     
+ Partials      327      323       -4     

see 2 files with indirect coverage changes

@Kynea0b Kynea0b marked this pull request as ready for review August 21, 2023 01:37
da1suk8
da1suk8 previously approved these changes Aug 23, 2023
Copy link

@170210 170210 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it's necessary to have the same test cases in "TestQueryContractInfo" and "TestQueryContractHistory" as well.

@loloicci
Copy link

How about using https://pkg.go.dev/github.com/stretchr/testify/assert#ErrorContains to compare errors and not import bech32 error type?

@Kynea0b
Copy link
Author

Kynea0b commented Aug 23, 2023

@loloicci
Thank you for your advice. I considered it. This test can be done without importing bech32 in this file if ErrorContaions is used, but equal test is more reliable. Error checking is fine as is. Also, since it was already imported with go.mod, there was no need to stick to not importing. So I will leave it as is.
https://github.com/Finschia/wasmd/blob/main/go.mod#L54

dudong2
dudong2 previously approved these changes Aug 23, 2023
loloicci
loloicci previously approved these changes Aug 23, 2023
da1suk8
da1suk8 previously approved these changes Aug 23, 2023
@Kynea0b Kynea0b dismissed stale reviews from da1suk8, loloicci, and dudong2 via d4c7dfc August 23, 2023 09:13
@Kynea0b Kynea0b merged commit 36ce1d3 into Finschia:main Aug 23, 2023
12 checks passed
@Kynea0b
Copy link
Author

Kynea0b commented Aug 23, 2023

Commits other than the ones below are unsquashed merge commits from other PR.
6e2e797
8b6ceb9
0b3c700

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.

5 participants