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

test(mbt): Use itf native support for sum types #111

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

romac
Copy link
Member

@romac romac commented Dec 7, 2023

No description provided.

@romac romac requested a review from hvanz December 7, 2023 16:06
Copy link

codecov bot commented Dec 7, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

❗ No coverage uploaded for pull request base (hvanz/votekeeper-sum-types@fd8f39c). Click here to learn what that means.

Additional details and impacted files
@@                      Coverage Diff                      @@
##             hvanz/votekeeper-sum-types     #111   +/-   ##
=============================================================
  Coverage                              ?   95.48%           
=============================================================
  Files                                 ?       30           
  Lines                                 ?     1792           
  Branches                              ?        0           
=============================================================
  Hits                                  ?     1711           
  Misses                                ?       81           
  Partials                              ?        0           
Flag Coverage Δ
integration 93.84% <ø> (?)
mbt 37.00% <100.00%> (?)

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.

@hvanz hvanz merged commit 808b028 into hvanz/votekeeper-sum-types Dec 7, 2023
@hvanz hvanz deleted the romac/votekeeper-sum-types branch December 7, 2023 20:34
romac added a commit that referenced this pull request Dec 8, 2023
* Use sum type for VoteType

* Use sum type for Threshold

* Use sum type for ExecutorEvent

* Use sum type for Value

* Update executor using votekeeper's new types

* Move unit tests near definition

* Fix SM and tests after merge

* Add types module

* Comment out id in types

* spec: remove initialRound

* fix spec

* Update itf tests

* cargo fmt

* Rename conflicting definitions

* Use `itf` native support for sum types (#111)

* spec driver: Bring some changes from main + some nits

* spec driver: another missing fix

* Rename voteBookkeepesSM to Models

* Move votekeeper types to common types

* Workspace dependencies

* Small cleanup

* Ensure syntax highlighting on GitHub

* spec: Rename outputs to keep it consistent with other modules

* Revert "spec: Rename outputs to keep it consistent with other modules"

This reverts commit 661ab33.

* Rename enum variants

---------

Co-authored-by: Romain Ruetschi <romain@informal.systems>
hvanz added a commit that referenced this pull request Dec 14, 2023
* Use sum type for VoteType

* Use sum type for Threshold

* Use sum type for ExecutorEvent

* Use sum type for Value

* Update executor using votekeeper's new types

* Move unit tests near definition

* Fix SM and tests after merge

* Add types module

* Comment out id in types

* spec: remove initialRound

* fix spec

* Update itf tests

* cargo fmt

* Rename conflicting definitions

* Use `itf` native support for sum types (#111)

* spec driver: Bring some changes from main + some nits

* spec driver: another missing fix

* Rename voteBookkeepesSM to Models

* Move votekeeper types to common types

* WIP

* Add timeout state functions

* Fixes to value types

* fix driver typecheck

* fix more types

* Fix value type

* Renaming + comments

* Fix another value expression + type annotations

* renaming, commentrs, type Command

* rename missing

* replace match for if

* Replace NewRoundStep with NoStep

* Fix driver.qnt

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* nits

* comments

* Driver indentation

* Driver comments and order of declarations

* Rename timeout to timeouts

* Rename es parameter

---------

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
romac added a commit that referenced this pull request Dec 19, 2023
* Use sum type for VoteType

* Use sum type for Threshold

* Use sum type for ExecutorEvent

* Use sum type for Value

* Update executor using votekeeper's new types

* Move unit tests near definition

* Fix SM and tests after merge

* Add types module

* Comment out id in types

* spec: remove initialRound

* fix spec

* Update itf tests

* cargo fmt

* Rename conflicting definitions

* Use `itf` native support for sum types (#111)

* spec driver: Bring some changes from main + some nits

* spec driver: another missing fix

* Rename voteBookkeepesSM to Models

* Move votekeeper types to common types

* WIP

* Add timeout state functions

* Fixes to value types

* fix driver typecheck

* fix more types

* Fix value type

* Renaming + comments

* Fix another value expression + type annotations

* renaming, commentrs, type Command

* rename missing

* replace match for if

* Replace NewRoundStep with NoStep

* Fix driver.qnt

Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>

* WIP

* nits

* spec: initial round from -1 to 0

* deserializer: NewRound to NoStep

* code formatting

* Revert "spec: initial round from -1 to 0"

This reverts commit 9ab2c7f.

* Fix BigInt deserializer in minus_one_as_none

* A few small fixes

* Remove NewHeightCInput

* Hack for initial round = -1 in spec

* debugging

* spec: forgot second arg for initFor

* spec: driver indentation

* Add NewRoundStep.. and more

* spec: set NewRoundStep when skipping round; change condition in NewRound input

* remove addresses from state in consensusTest: no need of multiple ConsensusStates

* code formatting

* more formatting

* Remove unused model values

* update makefile

* Handle more step cases

* Rename `DecidedStep` to `CommitStep`

* Cleanup

* Check expected value for `Vote` output

* Use `pretty_assertions` crate for prettier output on failure

* Add round to `TimeoutOutput` in the spec

* Basic check for `GetValueAndScheduleTimeout`

* Fix valid_round

* spec: fix TimeoutOutput

* Cleaner output

* Align code with spec to start in round nil instead of zero

* Add round number to `NewRound` input and update round in state machine

* Rename `Step::NewRound` to `Step::Unstarted`

* Rename `NewRoundStep` to `UnstartedStep` in the specs

* Remove leftover Skip threshold

---------

Co-authored-by: Romain Ruetschi <romain@informal.systems>
Co-authored-by: Josef Widder <44643235+josef-widder@users.noreply.github.com>
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.

2 participants