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: remaining incentive module unit tests #2061

Merged
merged 25 commits into from
Jun 19, 2023
Merged

test: remaining incentive module unit tests #2061

merged 25 commits into from
Jun 19, 2023

Conversation

toteki
Copy link
Member

@toteki toteki commented May 21, 2023

closes: #2005
progress: #1990

Note: What remains in #1990 is the leverage-side tests (basically hooks_test.go but run from the leverage module during its integration tests) and some edge cases.

@codecov
Copy link

codecov bot commented May 21, 2023

Codecov Report

Merging #2061 (400b08e) into main (7f05ad4) will decrease coverage by 0.57%.
The diff coverage is 78.29%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2061      +/-   ##
==========================================
- Coverage   75.38%   74.82%   -0.57%     
==========================================
  Files         100      126      +26     
  Lines        8025     9632    +1607     
==========================================
+ Hits         6050     7207    +1157     
- Misses       1589     1948     +359     
- Partials      386      477      +91     
Impacted Files Coverage Δ
ante/spam_prevention.go 75.92% <ø> (ø)
util/store/unmarshal.go 0.00% <0.00%> (ø)
x/incentive/codec.go 47.82% <ø> (+9.89%) ⬆️
x/incentive/keeper/invariants.go 0.00% <0.00%> (ø)
x/incentive/keeper/keeper.go 64.28% <ø> (ø)
x/leverage/keeper/errors.go 100.00% <ø> (ø)
x/leverage/keeper/exchange_rate.go 72.72% <ø> (ø)
x/leverage/keeper/genesis.go 87.23% <ø> (ø)
x/leverage/keeper/grpc_query.go 67.21% <ø> (ø)
x/leverage/keeper/incentive.go 0.00% <0.00%> (ø)
... and 69 more

... and 23 files with indirect coverage changes

@toteki toteki added the skip-e2e-test Skip the e2e tests label May 22, 2023
@toteki toteki marked this pull request as ready for review May 22, 2023 10:39
@toteki toteki requested a review from a team as a code owner May 22, 2023 10:39
Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

start of the review

x/incentive/genesis.go Show resolved Hide resolved
x/incentive/genesis_test.go Show resolved Hide resolved
Copy link
Member

@robert-zaremba robert-zaremba left a comment

Choose a reason for hiding this comment

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

We should have more tests which can interface the flow... eg: bond --> unbond partially --> check if rewards were paid --> more people bond --> wait few blocks --> see if rewards are distributed correctly. I can create few tasks with specific flows we should test.

NOTE: Would be good to follow the KeeperBuilder pattern (but this is not blocking the PR).

x/incentive/genesis.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Outdated Show resolved Hide resolved
x/incentive/genesis_test.go Show resolved Hide resolved
x/incentive/genesis_test.go Show resolved Hide resolved
@toteki toteki added this pull request to the merge queue Jun 19, 2023
Merged via the queue into main with commit 8e7fc9d Jun 19, 2023
@toteki toteki deleted the adam/unit branch June 19, 2023 22:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-e2e-test Skip the e2e tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incentive module follow-up features checklist
2 participants