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

refactor: use mock test utils in update skeleton tests #320

Conversation

AvivYossef-starkware
Copy link
Collaborator

@AvivYossef-starkware AvivYossef-starkware commented Jul 17, 2024

This change is Reviewable

@codecov-commenter
Copy link

codecov-commenter commented Jul 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 70.03%. Comparing base (2e85680) to head (172dc30).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #320   +/-   ##
=======================================
  Coverage   70.03%   70.03%           
=======================================
  Files          38       38           
  Lines        2109     2109           
  Branches     2109     2109           
=======================================
  Hits         1477     1477           
  Misses        562      562           
  Partials       70       70           

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

@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_filled_tree_test branch from 7f3b84f to efead81 Compare July 17, 2024 14:47
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch from 820db4f to bbaa973 Compare July 17, 2024 14:47
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_filled_tree_test branch from efead81 to 031e6ae Compare July 22, 2024 07:09
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch from bbaa973 to ca1fd58 Compare July 22, 2024 07:09
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_filled_tree_test branch from 031e6ae to 2835fec Compare July 22, 2024 07:12
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch 2 times, most recently from ff53cf1 to 2c72154 Compare July 22, 2024 07:25
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_filled_tree_test branch from 2835fec to dd68329 Compare July 22, 2024 08:11
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch from 2c72154 to 22f324c Compare July 22, 2024 08:12
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_filled_tree_test branch from dd68329 to c63563f Compare July 22, 2024 08:18
@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch from 22f324c to c2be47f Compare July 22, 2024 08:18
Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 3 files at r1, 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 3 unresolved discussions (waiting on @AvivYossef-starkware)


crates/committer/src/patricia_merkle_tree/internal_test_utils.rs line 29 at r2 (raw file):

use rstest::{fixture, rstest};

use crate::patricia_merkle_tree::filled_tree::tree::FilledTreeImpl;

if you move this above the use ethnum::U256 will it be sorted better...?

Code quote:

use crate::patricia_merkle_tree::filled_tree::tree::FilledTreeImpl;

crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs line 503 at r2 (raw file):

#[tokio::test]
async fn test_update_non_modified_storage_tree(#[case] root_hash: HashOutput) {
    use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig;

move to top

Code quote:

use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig

crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs line 148 at r2 (raw file):

#[case::non_empty_modifications(HashMap::from([(NodeIndex::FIRST_LEAF + NodeIndex::from(7), MockLeaf::default())]))]
fn test_updated_empty_tree(#[case] modifications: LeafModifications<MockLeaf>) {
    use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig;

move to top

Code quote:

use crate::patricia_merkle_tree::internal_test_utils::OriginalSkeletonMockTrieConfig;

@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch 2 times, most recently from 51282ef to 760e4bc Compare July 22, 2024 10:16
Copy link
Collaborator Author

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 1 of 3 files reviewed, 3 unresolved discussions (waiting on @dorimedini-starkware)


crates/committer/src/patricia_merkle_tree/internal_test_utils.rs line 29 at r2 (raw file):

Previously, dorimedini-starkware wrote…

if you move this above the use ethnum::U256 will it be sorted better...?

Yes.


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs line 503 at r2 (raw file):

Previously, dorimedini-starkware wrote…

move to top

Done.


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/tree_test.rs line 148 at r2 (raw file):

Previously, dorimedini-starkware wrote…

move to top

Done.

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r3, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @AvivYossef-starkware)


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs line 503 at r2 (raw file):

Previously, AvivYossef-starkware wrote…

Done.

nope

@AvivYossef-starkware AvivYossef-starkware force-pushed the 07-17-refactor_use_mock_test_utils_in_update_skeleton_tests branch from 760e4bc to 172dc30 Compare July 22, 2024 10:53
@AvivYossef-starkware AvivYossef-starkware changed the base branch from 07-17-refactor_use_mock_test_utils_in_filled_tree_test to main July 22, 2024 10:53
Copy link
Collaborator Author

@AvivYossef-starkware AvivYossef-starkware left a comment

Choose a reason for hiding this comment

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

Reviewable status: 2 of 3 files reviewed, 1 unresolved discussion (waiting on @dorimedini-starkware)


crates/committer/src/patricia_merkle_tree/updated_skeleton_tree/create_tree_helper_test.rs line 503 at r2 (raw file):

Previously, dorimedini-starkware wrote…

nope

Sorry

Copy link
Collaborator

@dorimedini-starkware dorimedini-starkware left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 1 of 1 files at r4, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on @AvivYossef-starkware)

@AvivYossef-starkware AvivYossef-starkware added this pull request to the merge queue Jul 24, 2024
Merged via the queue into main with commit 3c86674 Jul 24, 2024
13 checks passed
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