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 for empty request in each function #65

Merged
merged 9 commits into from
Aug 10, 2023

Conversation

170210
Copy link

@170210 170210 commented Aug 10, 2023

Description

Add a test case in each function because we have not tested if request is empty.
This PR has added tests for empty request in 6 functions, except contractsByCode(contractsByCode has not been tested, it will be fixed in another PR )

Motivation and context

How has this been tested?

Unit tests

Screenshots (if appropriate):

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.
  • I have updated API documentation client/docs/swagger-ui/swagger.yaml

@170210 170210 self-assigned this Aug 10, 2023
x/wasm/keeper/querier_test.go Outdated Show resolved Hide resolved
x/wasm/keeper/querier_test.go Outdated Show resolved Hide resolved
Copy link

@loloicci loloicci left a comment

Choose a reason for hiding this comment

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

same as these two comments for each test

Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
Signed-off-by: 170210 <j170210@icloud.com>
@codecov
Copy link

codecov bot commented Aug 10, 2023

Codecov Report

Merging #65 (e6e045a) into main (52a6659) will increase coverage by 0.21%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #65      +/-   ##
==========================================
+ Coverage   61.99%   62.21%   +0.21%     
==========================================
  Files          80       80              
  Lines        9971     9971              
==========================================
+ Hits         6182     6203      +21     
+ Misses       3452     3438      -14     
+ Partials      337      330       -7     

see 2 files with indirect coverage changes

loloicci
loloicci previously approved these changes Aug 10, 2023
Signed-off-by: 170210 <j170210@icloud.com>
@170210 170210 merged commit 1f60af6 into Finschia:main Aug 10, 2023
12 checks passed
@170210 170210 deleted the fixup/emptyerror branch August 17, 2023 09:10
@zemyblue zemyblue mentioned this pull request Oct 19, 2023
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