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

Add unit tests #67

Merged
merged 38 commits into from
Mar 20, 2024
Merged

Add unit tests #67

merged 38 commits into from
Mar 20, 2024

Conversation

DimaStebaev
Copy link
Contributor

@DimaStebaev DimaStebaev commented Jan 2, 2024

  • fix bugs
  • add tests
    • should not add validator with the same id
    • should not add validator with the same address
    • should not allow to top up more than max replenishment period
    • should set version
    • should allow to blacklist nodes
    • should allow to get information about validators and schains
    • should allow admin to claim rewards for the validator
    • should revert on incorrect time interval
    • should not allow to clean unprocessed data
    • should not allow to add to the processed part
    • should get value
    • should get value of empty sequence
    • should clear values
    • big random test
  • improve tests
    • should remove validator
  • refactor
    • remove long lines

Resolves #64
Resolves #70

Copy link

codecov bot commented Jan 2, 2024

Codecov Report

Attention: Patch coverage is 94.18605% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 95.85%. Comparing base (66251ad) to head (06dfeb9).

Files Patch % Lines
contracts/Paymaster.sol 88.46% 3 Missing ⚠️
contracts/types/Skl.sol 0.00% 2 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #67      +/-   ##
===========================================
+ Coverage    90.34%   95.85%   +5.50%     
===========================================
  Files           16       17       +1     
  Lines          777      796      +19     
  Branches       115      115              
===========================================
+ Hits           702      763      +61     
+ Misses          75       33      -42     

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

@DimaStebaev DimaStebaev marked this pull request as ready for review March 4, 2024 10:47
Copy link

@payvint payvint left a comment

Choose a reason for hiding this comment

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

Nice!!!

@DimaStebaev DimaStebaev merged commit 540c782 into develop Mar 20, 2024
10 checks passed
@DimaStebaev DimaStebaev deleted the 64-tests-2 branch March 20, 2024 16:52
@github-actions github-actions bot locked and limited conversation to collaborators Mar 20, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Necessary node history is deleted during clearHistory call Unit tests of distribution calculations
2 participants