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: add helper function for verifier tests #12771

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

miloserdow
Copy link
Member

Add verify_validate_and_charge_transaction function for verifier tests which combines validate_transaction and
verify_and_charge_transaction functions. This reduces complexity of current and future tests.

Add `verify_validate_and_charge_transaction` function for verifier
tests which combines `validate_transaction` and
`verify_and_charge_transaction` functions. This reduces complexity of
current and future tests.
@miloserdow miloserdow added A-testing Area: Unit testing / integration testing P-low Priority: low B-L1 Bootcamp: (“Nit”) minor 1-5 code line change T-contract-runtime Team: issues relevant to the contract runtime team C-backlog labels Jan 22, 2025
@miloserdow miloserdow requested a review from a team as a code owner January 22, 2025 13:46
@miloserdow miloserdow requested a review from akhi3030 January 22, 2025 13:46
@miloserdow miloserdow requested a review from nagisa January 22, 2025 13:51
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 98.18182% with 1 line in your changes missing coverage. Please review.

Project coverage is 70.53%. Comparing base (058ef4d) to head (275a13b).

Files with missing lines Patch % Lines
runtime/runtime/src/verifier.rs 98.18% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master   #12771      +/-   ##
==========================================
+ Coverage   70.51%   70.53%   +0.01%     
==========================================
  Files         846      846              
  Lines      174633   174623      -10     
  Branches   174633   174623      -10     
==========================================
+ Hits       123144   123163      +19     
+ Misses      46261    46232      -29     
  Partials     5228     5228              
Flag Coverage Δ
backward-compatibility 0.16% <ø> (ø)
db-migration 0.16% <ø> (ø)
genesis-check 1.35% <ø> (ø)
linux 68.90% <98.18%> (-0.01%) ⬇️
linux-nightly 70.12% <98.18%> (+0.02%) ⬆️
pytests 1.65% <ø> (ø)
sanity-checks 1.46% <ø> (ø)
unittests 70.36% <98.18%> (+0.01%) ⬆️
upgradability 0.20% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@@ -796,6 +796,31 @@ mod tests {
}
}

pub fn verify_validate_and_charge_transaction(
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
pub fn verify_validate_and_charge_transaction(
pub fn validate_verify_and_charge_transaction(

As the functions are correspondingly validate_transaction and verify_and_charge_transaction.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-testing Area: Unit testing / integration testing B-L1 Bootcamp: (“Nit”) minor 1-5 code line change C-backlog P-low Priority: low T-contract-runtime Team: issues relevant to the contract runtime team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants