-
Notifications
You must be signed in to change notification settings - Fork 15
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
create-poll, answer-poll, verify-poll: move to 'babbage governance' block #322
Conversation
ad8be80
to
f9f9f5f
Compare
fc10f21
to
ea30fe7
Compare
886bdb5
to
3ac7b6f
Compare
3ac7b6f
to
e5ed4f8
Compare
@@ -1,6 +1,6 @@ | |||
{-# LANGUAGE OverloadedStrings #-} | |||
|
|||
module Test.Golden.Shelley.Governance.AnswerPoll where | |||
module Test.Golden.Babbage.Governance.AnswerPoll where |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Shelley
in Test.Golden.Shelley.Governance.AnswerPoll
doesn't mean Shelley
era, it means "Shelley Based Era", which is confusing.
When in era-based, we shouldn't organise by era because it can get complicated. We should omit both era and eon.
Maybe the module should beTest.Golden.EraBased.Governance.AnswerPoll
to say we are testing era-based commands.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
OK I see 👍
I changed to Test.Golden.EraBased.Governance.AnswerPoll
.
cardano-cli/test/cardano-cli-golden/Test/Golden/Babbage/Governance/VerifyPoll.hs
Outdated
Show resolved
Hide resolved
expectedAnswerFile <- noteInputFile "test/cardano-cli-golden/files/golden/shelley/governance/polls/basic.answer.0.json" | ||
hprop_golden_babbageGovernanceAnswerPoll0 :: Property | ||
hprop_golden_babbageGovernanceAnswerPoll0 = propertyOnce . H.moduleWorkspace "governance-answer-poll" $ \tempDir -> do | ||
pollFile <- noteInputFile "test/cardano-cli-golden/files/golden/babbage/governance/polls/basic.json" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be test/cardano-cli-golden/files/input/governance/polls/basic.json
That is:
- Replace
golden
withinput
because this is not a golden file. - Delete
babbage
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did the change 👍
cardano-cli/test/cardano-cli-golden/Test/Golden/Babbage/Governance/AnswerPoll.hs
Outdated
Show resolved
Hide resolved
e5ed4f8
to
55f92db
Compare
8fabc26
to
5add478
Compare
(Maybe Word) -- ^ Answer index | ||
(Maybe (File () Out)) -- ^ Tx file | ||
| GovernanceVerifyPoll -- ^ Verify answer to a given SPO poll | ||
(BabbageEraOnwards era) {- TODO smelc, use BabbageEraOnly here instead -} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these TODOs still relevant?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes they are, because the poll
commands are babbage only, whereas this is babbage onwards.
cardano-cli/src/Cardano/CLI/EraBased/Options/Governance/Poll.hs
Outdated
Show resolved
Hide resolved
A few more comments. Merge when you're ready. |
…ed once change lands in cardano-api.
c847186
to
834d66e
Compare
[--out-file FILE] | ||
|
||
Verify an answer to a given SPO poll | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, an oversight in my review. We're not actually supposed to delete the legacy commands. These need to be kept in tact. We will eventually delete all the legacy commands in one go, but not right now.
Changelog
Context
Part of fixing #313
Checklist
See Running tests for more details
.cabal
files are updatedhlint
. See.github/workflows/check-hlint.yml
to get thehlint
versionstylish-haskell
. See.github/workflows/stylish-haskell.yml
to get thestylish-haskell
versionghc-8.10.7
andghc-9.2.7