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

feat: uibc unit tests #2021

Merged
merged 10 commits into from
May 5, 2023
Merged

feat: uibc unit tests #2021

merged 10 commits into from
May 5, 2023

Conversation

robert-zaremba
Copy link
Member

@robert-zaremba robert-zaremba commented May 5, 2023

Description

Finalized unit tests framework based on uibc package

  • moved integration tests to intest directory - integration tests take 2x time to setup due to dependency loading
  • crated KeeperBuilder patter to separate sdk.Context dependency
  • Keeper should not depend on context - currently it is still there due to Oracle and Leverage interface, which will be solved in a subsequent PR using adapter.

Advantages:

  • easier setup for unit tests
  • smaller code units
  • faster tests
  • less dependencies
  • facility to make unit tests!

@robert-zaremba robert-zaremba requested a review from a team as a code owner May 5, 2023 10:11
@robert-zaremba robert-zaremba requested review from kosegor, gsk967, toteki and a team and removed request for a team May 5, 2023 10:11
@codecov
Copy link

codecov bot commented May 5, 2023

Codecov Report

Merging #2021 (1389500) into main (7f05ad4) will decrease coverage by 8.17%.
The diff coverage is 44.59%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2021      +/-   ##
==========================================
- Coverage   75.38%   67.21%   -8.17%     
==========================================
  Files         100      118      +18     
  Lines        8025     9338    +1313     
==========================================
+ Hits         6050     6277     +227     
- Misses       1589     2596    +1007     
- Partials      386      465      +79     
Impacted Files Coverage Δ
util/store/unmarshal.go 0.00% <0.00%> (ø)
x/incentive/codec.go 47.82% <ø> (+9.89%) ⬆️
x/incentive/keeper/grpc_query.go 0.00% <0.00%> (ø)
x/incentive/keeper/hooks.go 0.00% <0.00%> (ø)
x/incentive/keeper/invariants.go 0.00% <0.00%> (ø)
x/leverage/keeper/incentive.go 0.00% <0.00%> (ø)
x/oracle/keeper/hooks.go 95.65% <ø> (ø)
x/uibc/quota/keeper/genesis.go 0.00% <0.00%> (-100.00%) ⬇️
x/uibc/quota/keeper/grpc_query.go 0.00% <0.00%> (-76.93%) ⬇️
x/uibc/quota/keeper/ics4_wrapper.go 0.00% <0.00%> (ø)
... and 35 more

... and 2 files with indirect coverage changes

@kosegor
Copy link
Contributor

kosegor commented May 5, 2023

LGTM

@robert-zaremba robert-zaremba requested a review from a team as a code owner May 5, 2023 15:30
@robert-zaremba robert-zaremba added this pull request to the merge queue May 5, 2023
Merged via the queue into main with commit 0c704b9 May 5, 2023
@robert-zaremba robert-zaremba deleted the robert/uibc-unit-tests branch May 5, 2023 22:39
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