Skip to content

Commit

Permalink
Adapt tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Jun 13, 2024
1 parent 8a20217 commit d85a1bb
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ hprop_golden_governance_action_create_constitution =
redactedActionFile <- noteTempFile tempDir "create-constitution.action.redacted"

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

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

void $ execCardanoCLI
Expand Down Expand Up @@ -63,15 +63,15 @@ hprop_golden_conway_governance_action_view_constitution_json =

-- We go through a file for the hash, to test --out-file
void $ execCardanoCLI
[ "conway", "governance", "hash", "anchor-data"
[ "conway", "hash", "anchor-data"
, "--text", "whatever "
, "--out-file", hashFile
]

proposalHash <- H.readFile hashFile

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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ hprop_golden_governance_UpdateCommittee =
outFile <- H.noteTempFile tempDir "answer-file.json"

proposalHash <- execCardanoCLI
[ "conway", "governance", "hash", "anchor-data"
[ "conway", "hash", "anchor-data"
, "--file-text", ccProposal ]

H.note_ proposalHash
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ hprop_golden_governance_hash_script =
hashGold <- H.note "test/cardano-cli-golden/files/golden/governance/hash/foo.script.hash"

void $ execCardanoCLI
[ "conway", "governance", "hash", "script"
[ "conway", "hash", "script"
, "--script-file", scriptFile
, "--out-file", hashFile
]
Expand Down
4 changes: 2 additions & 2 deletions cardano-cli/test/cardano-cli-test/Test/Cli/Governance/Hash.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ governance_hash_trip_fun input =
hashFile <- noteTempFile tempDir "hash.txt"

hash <- execCardanoCLI
[ "conway", "governance", "hash", "anchor-data"
[ "conway", "hash", "anchor-data"
, "--text", input
]

void $ execCardanoCLI
[ "conway", "governance", "hash", "anchor-data"
[ "conway", "hash", "anchor-data"
, "--text", input
, "--out-file", hashFile
]
Expand Down

0 comments on commit d85a1bb

Please sign in to comment.