near / nearcore

Reference client for NEAR Protocol
https://near.org
GNU General Public License v3.0
2.3k stars 601 forks source link

debug: improve migration test #11655

Closed Longarithm closed 2 weeks ago

Longarithm commented 2 weeks ago

Add unstaking and staking back to the db_migration test. Checking that #11569 would cause this version of test to fail. Still not covers GC failure of EpochInfo, but that's a good improvement on its own.

Also, refactored to run nodes using start_cluster, as in other tests, instead of subprocess.call. This allows to override genesis and node configs.

codecov[bot] commented 2 weeks ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 71.66%. Comparing base (9f5b03e) to head (0772761). Report is 14 commits behind head on master.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #11655 +/- ## ========================================== + Coverage 71.59% 71.66% +0.07% ========================================== Files 787 787 Lines 160736 161063 +327 Branches 160736 161063 +327 ========================================== + Hits 115072 115426 +354 + Misses 40631 40591 -40 - Partials 5033 5046 +13 ``` | [Flag](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | Coverage Δ | | |---|---|---| | [backward-compatibility](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (-0.01%)` | :arrow_down: | | [db-migration](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.23% <ø> (-0.01%)` | :arrow_down: | | [genesis-check](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.36% <ø> (-0.01%)` | :arrow_down: | | [integration-tests](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `37.82% <ø> (+0.08%)` | :arrow_up: | | [linux](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `69.05% <ø> (+0.05%)` | :arrow_up: | | [linux-nightly](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `71.16% <ø> (+0.09%)` | :arrow_up: | | [macos](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `52.62% <ø> (+1.27%)` | :arrow_up: | | [pytests](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.59% <ø> (-0.01%)` | :arrow_down: | | [sanity-checks](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `1.39% <ø> (-0.01%)` | :arrow_down: | | [unittests](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `66.23% <ø> (+0.06%)` | :arrow_up: | | [upgradability](https://app.codecov.io/gh/near/nearcore/pull/11655/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near) | `0.28% <ø> (-0.01%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=near#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.