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

Improve neotest to serve coverage needs #3551

Merged
merged 2 commits into from
Aug 9, 2024
Merged

Improve neotest to serve coverage needs #3551

merged 2 commits into from
Aug 9, 2024

Conversation

AnnaShaleva
Copy link
Member

@AnnaShaleva AnnaShaleva commented Aug 9, 2024

  1. Bind neotest.AddSystemFee and neotest.TestInvoke to Executor state.
  2. Calculate system fee for deployment transactions.

Reasons are explained in the commit messages. @roman-khimov, these commits made in a breaking way, but if we care about our users a lot, then I can mark related methods as "deprecated" and introduce new Executor methods in a soft way. Do we?

A ground for #3462.

These methods need Executor's context to properly process coverage, thus
these methods are not independent anymore. Ref.
#3462 (review).

Signed-off-by: Anna Shaleva <[email protected]>
1. Bind NewDeployTxBy to Executor to be able to use
   (*Executor).AddSystemFee.
2. Replace pre-defined constant deployment fee by calculated one.

This change is needed to be able to properly collect coverage for
_deploy method of a contract via neotest coverage. Ref.
#3462 (review).

Signed-off-by: Anna Shaleva <[email protected]>
@AnnaShaleva AnnaShaleva added enhancement Improving existing functionality I3 Minimal impact U4 Nothing urgent S3 Minimally significant labels Aug 9, 2024
@AnnaShaleva AnnaShaleva added this to the v0.106.4 milestone Aug 9, 2024
Copy link

codecov bot commented Aug 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.05%. Comparing base (ffcbe6a) to head (72d1427).

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #3551      +/-   ##
==========================================
+ Coverage   86.04%   86.05%   +0.01%     
==========================================
  Files         330      330              
  Lines       38674    38675       +1     
==========================================
+ Hits        33276    33282       +6     
+ Misses       3853     3848       -5     
  Partials     1545     1545              

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

Copy link
Member

@roman-khimov roman-khimov left a comment

Choose a reason for hiding this comment

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

I doubt anyone would notice these changes and they're easy to handle.

pkg/neotest/basic.go Show resolved Hide resolved
@roman-khimov roman-khimov merged commit f0266a9 into master Aug 9, 2024
21 checks passed
@roman-khimov roman-khimov deleted the neotest-fixes branch August 9, 2024 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Improving existing functionality I3 Minimal impact S3 Minimally significant U4 Nothing urgent
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants