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(katana-provider): more elaborate tests #1317

Merged
merged 2 commits into from
Dec 19, 2023

Conversation

kariy
Copy link
Member

@kariy kariy commented Dec 19, 2023

This PR add tests for the different provider implementations (ie. in-memory, fork, and db (soon) provider).

The tests are testing for state access which includes storage, classes, as well as generic contract state (ie nonce, and class hash). The tests also covers both latest and historical data access. Tests for the DB provider variant will be included along with its provider implementation (which will be in the next PR).

This PR also updates the block insertion test a little bit.

@kariy kariy requested review from glihm and tarrencev December 19, 2023 15:16
@codecov-commenter
Copy link

Codecov Report

Attention: 3 lines in your changes are missing coverage. Please review.

Comparison is base (bc42b8e) 59.24% compared to head (5e4a018) 60.48%.

Files Patch % Lines
crates/katana/primitives/src/receipt.rs 62.50% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1317      +/-   ##
==========================================
+ Coverage   59.24%   60.48%   +1.23%     
==========================================
  Files         225      225              
  Lines       18900    18900              
==========================================
+ Hits        11198    11431     +233     
+ Misses       7702     7469     -233     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@glihm glihm left a comment

Choose a reason for hiding this comment

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

Only small comment to avoid having the logs in the git diff after running the tests.

@kariy kariy merged commit 1840d72 into dojoengine:main Dec 19, 2023
9 checks passed
@kariy kariy deleted the provider-tests branch December 20, 2023 00:29
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