Skip to content

Commit

Permalink
Adapt golden tests: vote-create with anchor
Browse files Browse the repository at this point in the history
  • Loading branch information
carlhammann committed Oct 11, 2023
1 parent 56ac04f commit 04806cd
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ hprop_golden_governance_governance_vote_create =
, "--governance-action-index", "5"
, "--drep-verification-key-file", vkeyFile
, "--out-file", voteFile
, "--vote-anchor-url", "https://example.com/vote"
, "--vote-anchor-text", "I don't like this proposal, because it's bad. I'm not going to tell you why I voted yes nonetheless."
]

H.diffFileVsGoldenFile voteFile voteGold
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "Governance voting procedures",
"description": "",
"cborHex": "a18202581ceb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294da1825820b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a058201f6"
"cborHex": "a18202581ceb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294da1825820b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a05820182781868747470733a2f2f6578616d706c652e636f6d2f766f746558206c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de"
}
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
{
"drep-keyHash-eb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294d": {
"b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#5": {
"anchor": null,
"anchor": {
"dataHash": "6c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de",
"url": "https://example.com/vote"
},
"decision": "VoteYes"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
drep-keyHash-eb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294d:
b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#5:
anchor: null
anchor:
dataHash: 6c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de
url: https://example.com/vote
decision: VoteYes
4 changes: 4 additions & 0 deletions cardano-cli/test/cardano-cli-golden/files/golden/help.cli
Original file line number Diff line number Diff line change
Expand Up @@ -6496,6 +6496,10 @@ Usage: cardano-cli conway governance vote create (--yes | --no | --abstain)
| --cc-hot-key-hash STRING
)
--out-file FILE
[--vote-anchor-url TEXT
( --vote-anchor-text TEXT
| --vote-anchor-file FILE
)]

Vote creation.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ Usage: cardano-cli conway governance vote create (--yes | --no | --abstain)
| --cc-hot-key-hash STRING
)
--out-file FILE
[--vote-anchor-url TEXT
( --vote-anchor-text TEXT
| --vote-anchor-file FILE
)]

Vote creation.

Expand Down Expand Up @@ -41,4 +45,7 @@ Available options:
Filepath of the Consitutional Committee hot key.
--cc-hot-key-hash STRING Constitutional Committee key hash (hex-encoded).
--out-file FILE Output filepath of the vote.
--vote-anchor-url TEXT vote anchor URL
--vote-anchor-text TEXT Input vote anchor contents as UTF-8 encoded text.
--vote-anchor-file FILE Input vote anchor contents as a text file.
-h,--help Show this help text

0 comments on commit 04806cd

Please sign in to comment.