Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 17, 2023
1 parent 34d29e3 commit 77236d7
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,11 @@ hprop_golden_governance_action_create_constitution =

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

constitutionHash <- execCardanoCLI
[ "conway", "governance", "hash"
, "--text", "something else"]

void $ execCardanoCLI
[ "conway", "governance", "action", "create-constitution"
Expand All @@ -39,8 +43,8 @@ hprop_golden_governance_action_create_constitution =
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--out-file", actionFile
, "--constitution-anchor-url", "constitution-dummy-url"
, "--constitution-anchor-metadata", "This is a test constitution."
, "--constitution-url", "constitution-dummy-url"
, "--constitution-hash", constitutionHash
]

goldenActionFile <- H.note "test/cardano-cli-golden/files/golden/governance/action/create-constitution-for-stake-address.action.golden"
Expand All @@ -67,6 +71,11 @@ hprop_golden_conway_governance_action_view_constitution_json =

proposalHash <- H.readFile hashFile

constitutionHash <- execCardanoCLI
[ "conway", "governance", "hash"
, "--text", "nonAsciiInput: 你好 and some more: こんにちは"
]

void $ execCardanoCLI
[ "conway", "governance", "action", "create-constitution"
, "--mainnet"
Expand All @@ -75,8 +84,8 @@ hprop_golden_conway_governance_action_view_constitution_json =
, "--governance-action-deposit", "10"
, "--stake-verification-key-file", stakeAddressVKeyFile
, "--out-file", actionFile
, "--constitution-anchor-url", "constitution-dummy-url"
, "--constitution-anchor-metadata", "This is a test constitution."
, "--constitution-url", "http://my-great-constitution.rocks"
, "--constitution-hash", constitutionHash
]

goldenActionViewFile <- H.note "test/cardano-cli-golden/files/golden/governance/action/view/create-constitution.action.view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
null,
{
"anchor": {
"dataHash": "42cb2e410023679943d26c23ce2b5046eb7dfc5883c69fb91cc8a3c9c9a99a99",
"url": "constitution-dummy-url"
"dataHash": "913844423a72d4ff4cffe1ca2bed8e7f354dba7563df9e630e5b6a86fa72659a",
"url": "http://my-great-constitution.rocks"
}
}
],
Expand Down

0 comments on commit 77236d7

Please sign in to comment.