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

Tests elections pallet #5190

Merged
merged 16 commits into from
Sep 23, 2024
Merged

Tests elections pallet #5190

merged 16 commits into from
Sep 23, 2024

Conversation

Janislav
Copy link
Contributor

@Janislav Janislav commented Aug 22, 2024

Pull Request

Closes: PRO-1575, PRO-1577

Checklist

Please conduct a thorough self-review before opening the PR.

  • I am confident that the code works.
  • I have written sufficient tests.
  • I have written and tested required migrations.
  • I have updated documentation where appropriate.

Summary

WIP unit-tests for the elections pallet.

Non-Breaking changes

If this PR includes non-breaking changes, select the non-breaking label. On merge, CI will automatically cherry-pick the commit to a PR against the release branch.

Copy link

codecov bot commented Aug 22, 2024

Codecov Report

Attention: Patch coverage is 88.80000% with 28 lines in your changes missing coverage. Please review.

Project coverage is 70%. Comparing base (8f2f1c9) to head (b5429bd).
Report is 7 commits behind head on main.

Files with missing lines Patch % Lines
...pallets/cf-elections/src/electoral_systems/mock.rs 47% 18 Missing and 2 partials ⚠️
state-chain/pallets/cf-elections/src/tests.rs 96% 4 Missing and 1 partial ⚠️
...hain/test-utilities/src/rich_test_externalities.rs 95% 3 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff           @@
##            main   #5190    +/-   ##
======================================
  Coverage     70%     70%            
======================================
  Files        486     487     +1     
  Lines      87138   87295   +157     
  Branches   87138   87295   +157     
======================================
+ Hits       61173   61314   +141     
- Misses     22686   22700    +14     
- Partials    3279    3281     +2     
Flag Coverage Δ
70% <89%> (?)

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.

@kylezs kylezs self-requested a review August 23, 2024 08:04
@Janislav Janislav marked this pull request as ready for review August 26, 2024 13:33
@syan095
Copy link
Contributor

syan095 commented Sep 2, 2024

I want to add some condition checks to the "delete_vote" test. should be done soon

Copy link
Collaborator

@dandanlen dandanlen left a comment

Choose a reason for hiding this comment

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

Thanks - same as with the other PR, i'll reconcile this with the changes in #5186 and then get everything merged together.

@dandanlen
Copy link
Collaborator

I've replaced one of the tests and commented out the others (for now) because they need to be updated to use the mock electoral system instead of the median system.

@dandanlen dandanlen force-pushed the tests/pro-1561/elections-pallet branch from 8e93f69 to bc0da8b Compare September 19, 2024 08:07
@dandanlen dandanlen force-pushed the tests/pro-1561/elections-pallet branch from bc0da8b to 3af0f57 Compare September 19, 2024 09:14
@dandanlen dandanlen force-pushed the tests/pro-1561/elections-pallet branch from 77067b8 to b5429bd Compare September 23, 2024 08:31
@dandanlen dandanlen added this pull request to the merge queue Sep 23, 2024
Merged via the queue into main with commit 6d33725 Sep 23, 2024
49 checks passed
@dandanlen dandanlen deleted the tests/pro-1561/elections-pallet branch September 23, 2024 12:52
syan095 added a commit that referenced this pull request Oct 2, 2024
…-sdk-1.15.2

* origin/main: (31 commits)
  feat: liveness electoral system (#5278)
  chore: bump asset-balances to match release (#5305)
  refactor: Strongly-typed identifiers for SwapId/SwapRequestId (#5294)
  fix: only install solana if `run-job` is true 🐛 (#5304)
  Chore/debug 3 nodes (#5302)
  feat: remove swap and retry batch on price impact (#5285)
  refactor: Collect settings extrinsic in threshold signer pallet into a single extrinsic (#5299)
  feat: add solana monitoring data (#5277)
  fix: Redemption amount printed not consistent in rounding (#5296)
  refactor: use chainflip api for DCA test (#5289)
  fix: add audit exception for RUSTSEC-2024-0375 (#5303)
  fix: filter out stale bitcoin utxos (#5291)
  PRO-1594: Add healthcheck endpoints to broker and lp apis (#5282)
  Tests elections pallet (#5190)
  PRO-1620: Ensure that default port is used if none is given in configuration (#5281)
  test: egress success tests (#5288)
  feat: localnet scripts to create and recreate easier (#5284)
  Denote broadcast timeout in target chain blocks. (#5270)
  fix: force version bump endpoint (#5280)
  refactor: user friendly bouncer new swap cmd  (#5273)
  ...

# Conflicts:
#	.zepter.yaml
#	Cargo.lock
#	api/bin/chainflip-cli/Cargo.toml
#	api/bin/chainflip-lp-api/src/main.rs
#	engine/Cargo.toml
#	state-chain/custom-rpc/Cargo.toml
#	state-chain/custom-rpc/src/lib.rs
#	state-chain/pallets/cf-swapping/src/lib.rs
#	state-chain/runtime/src/monitoring_apis.rs
#	utilities/Cargo.toml
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.

4 participants