Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 9, 2023
1 parent 3130c19 commit 9fe6ea3
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 14 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ hprop_golden_governance_action_create_constitution =
actionFile <- noteTempFile tempDir "create-constitution.action"
redactedActionFile <- noteTempFile tempDir "create-constitution.action.redacted"

proposalHash <- execCardanoCLI
[ "conway", "governance", "hash"
, "--text", "whatever "]

void $ execCardanoCLI
[ "conway", "governance", "action", "create-constitution"
, "--mainnet"
, "--proposal-anchor-metadata", "eda258650888d4a7f8ac1127cfa136962f527f341c99db49929c79ae"
, "--proposal-anchor-url", "proposal-dummy-url"
, "--proposal-anchor-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--proposal-anchor-url", proposalHash
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--out-file", actionFile
Expand All @@ -52,10 +56,14 @@ hprop_golden_conway_governance_action_view_constitution_json =

actionFile <- noteTempFile tempDir "action"

proposalHash <- execCardanoCLI
[ "conway", "governance", "hash"
, "--text", "whatever "]

void $ execCardanoCLI
[ "conway", "governance", "action", "create-constitution"
, "--mainnet"
, "--proposal-anchor-metadata", "eda258650888d4a7f8ac1127cfa136962f527f341c99db49929c79ae"
, "--proposal-anchor-hash", proposalHash
, "--proposal-anchor-url", "proposal-dummy-url"
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
Expand Down Expand Up @@ -84,7 +92,7 @@ hprop_golden_conway_governance_action_view_update_committee_yaml =
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--proposal-anchor-url", "proposal-dummy-url"
, "--proposal-anchor-metadata", "eda258650888d4a7f8ac1127cfa136962f527f341c99db49929c79ae"
, "--proposal-anchor-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--quorum", "0.61"
, "--out-file", actionFile
]
Expand All @@ -110,7 +118,7 @@ hprop_golden_conway_governance_action_view_create_info_json_outfile =
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--proposal-anchor-url", "proposal-dummy-url"
, "--proposal-anchor-metadata", "eda258650888d4a7f8ac1127cfa136962f527f341c99db49929c79ae"
, "--proposal-anchor-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--out-file", actionFile
]

Expand All @@ -136,7 +144,7 @@ hprop_golden_governanceActionCreateNoConfidence =
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--proposal-anchor-url", "proposal-dummy-url"
, "--proposal-anchor-metadata", "eda258650888d4a7f8ac1127cfa136962f527f341c99db49929c79ae"
, "--proposal-anchor-hash", "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745"
, "--governance-action-index", "5"
, "--governance-action-tx-id", "b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a"
, "--out-file", actionFile
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ hprop_golden_governance_governance_vote_create =
, "--drep-verification-key-file", vkeyFile
, "--out-file", voteFile
, "--vote-anchor-url", "https://example.com/vote"
, "--vote-anchor-metadata", "I don't like this proposal, because it's bad. I'm not going to tell you why I voted yes nonetheless."
, "--vote-anchor-hash", "6163683a90d8cb460a38cdcf0d7bab286f0f004ec6e761dc670c2ca4d3709a17"
]

H.diffFileVsGoldenFile voteFile voteGold
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"anchor": {
"dataHash": "04c36ab926c8d0e6b37d03c781bdf0214b67f65af6eb1241459d17209a0bf784",
"dataHash": "2399719c6477ac0cd1348ef84d6752194280b10b58163593366f6e2ca9f28cd2",
"url": "proposal-dummy-url"
},
"deposit": 10,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"anchor": {
"dataHash": "04c36ab926c8d0e6b37d03c781bdf0214b67f65af6eb1241459d17209a0bf784",
"dataHash": "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745",
"url": "proposal-dummy-url"
},
"deposit": 10,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"anchor": {
"dataHash": "04c36ab926c8d0e6b37d03c781bdf0214b67f65af6eb1241459d17209a0bf784",
"dataHash": "c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745",
"url": "proposal-dummy-url"
},
"deposit": 10,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
anchor:
dataHash: 04c36ab926c8d0e6b37d03c781bdf0214b67f65af6eb1241459d17209a0bf784
dataHash: c7ddb5b493faa4d3d2d679847740bdce0c5d358d56f9b1470ca67f5652a02745
url: proposal-dummy-url
deposit: 10
governance action:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"type": "Governance voting procedures",
"description": "",
"cborHex": "a18202581ceb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294da1825820b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a05820182781868747470733a2f2f6578616d706c652e636f6d2f766f746558206c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de"
"cborHex": "a18202581ceb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294da1825820b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a05820182781868747470733a2f2f6578616d706c652e636f6d2f766f746558206163683a90d8cb460a38cdcf0d7bab286f0f004ec6e761dc670c2ca4d3709a17"
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"drep-keyHash-eb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294d": {
"b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#5": {
"anchor": {
"dataHash": "6c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de",
"dataHash": "6163683a90d8cb460a38cdcf0d7bab286f0f004ec6e761dc670c2ca4d3709a17",
"url": "https://example.com/vote"
},
"decision": "VoteYes"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
drep-keyHash-eb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294d:
b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a#5:
anchor:
dataHash: 6c4aa4dc17fc4d173f1c9a23c266acba6f942e7ae9f06103ea0ed1333b8d68de
dataHash: 6163683a90d8cb460a38cdcf0d7bab286f0f004ec6e761dc670c2ca4d3709a17
url: https://example.com/vote
decision: VoteYes

0 comments on commit 9fe6ea3

Please sign in to comment.