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 more tests for voting behaviour #4603

Merged
merged 4 commits into from
Oct 1, 2024
Merged

Add more tests for voting behaviour #4603

merged 4 commits into from
Oct 1, 2024

Conversation

Lucsanszky
Copy link
Contributor

@Lucsanszky Lucsanszky commented Sep 6, 2024

Description

Resolves #4326, #4513

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated
  • All visible changes are prepended to the latest section of a CHANGELOG.md for the affected packages.
    New section is never added with the code changes. (See RELEASING.md)
  • When applicable, versions are updated in .cabal and CHANGELOG.md files according to the
    versioning process.
  • The version bounds in .cabal files for all affected packages are updated.
    If you change the bounds in a cabal file, that package itself must have a version increase. (See RELEASING.md)
  • Code is formatted with fourmolu (use scripts/fourmolize.sh)
  • Cabal files are formatted (use scripts/cabal-format.sh)
  • hie.yaml has been updated (use scripts/gen-hie.sh)
  • Self-reviewed the diff

@Lucsanszky Lucsanszky force-pushed the ldan/voting-tests branch 6 times, most recently from da55054 to 7932cd6 Compare September 27, 2024 04:19
@Lucsanszky Lucsanszky marked this pull request as ready for review September 27, 2024 04:22
@Lucsanszky Lucsanszky requested a review from a team as a code owner September 27, 2024 04:22
@Lucsanszky
Copy link
Contributor Author

I recommend reviewing commit-by-commit so the refactoring commit doesn't get in your way.

@Lucsanszky Lucsanszky force-pushed the ldan/voting-tests branch 2 times, most recently from 31278fa to 40d01a5 Compare September 27, 2024 05:30
Copy link
Contributor

@teodanciu teodanciu left a comment

Choose a reason for hiding this comment

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

Looks good to me, happy to see these relevant scenarios being tested. I left some minor comments and questions.

@Lucsanszky Lucsanszky force-pushed the ldan/voting-tests branch 6 times, most recently from 692c40a to 64cf83c Compare September 30, 2024 23:42
@Lucsanszky Lucsanszky force-pushed the ldan/voting-tests branch 2 times, most recently from 0ad415a to b01b1e3 Compare October 1, 2024 00:03
  * Test basic interaction between the governing bodies:
    - Motion of no-confidence
    - Update committee - normal state
    - Hard-fork initiation
    - Thresholds are set to 0 for all governing bodies,
      thus proposals are enacted automatically
  * Assert that they won't be able to serve when `maxTermLength = 0`
  * Assert that they can serve a term when `maxTermLength = 1`

Resolves #4513
  * Test when CC is expired:
    - SPOs alone can't enact hard-fork (thus getting stuck in bootstrap phase)
    - SPOs alone can't enact security group parameter change
  * Test when CC threshold is 0:
    - SPOs alone can enact hard-fork
    - SPOs alone can enact security group parameter change
@Lucsanszky Lucsanszky merged commit c227605 into master Oct 1, 2024
165 of 167 checks passed
@Lucsanszky Lucsanszky deleted the ldan/voting-tests branch October 1, 2024 14:04
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.

Write tests for voting behavior
2 participants