Skip to content

Commit

Permalink
Make an existing test use the new --out-file flag
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Nov 16, 2023
1 parent 31f5d48 commit f216caa
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import Test.Cardano.CLI.Util
import Hedgehog (Property)
import qualified Hedgehog.Extras.Test.Base as H
import qualified Hedgehog.Extras.Test.Golden as H
import qualified Hedgehog.Extras as H

hprop_golden_governance_action_create_constitution :: Property
hprop_golden_governance_action_create_constitution =
Expand Down Expand Up @@ -53,12 +54,18 @@ hprop_golden_conway_governance_action_view_constitution_json :: Property
hprop_golden_conway_governance_action_view_constitution_json =
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
stakeAddressVKeyFile <- H.note "test/cardano-cli-golden/files/input/governance/stake-address.vkey"
hashFile <- noteTempFile tempDir "hash.txt"

actionFile <- noteTempFile tempDir "action"

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

proposalHash <- H.readFile hashFile

void $ execCardanoCLI
[ "conway", "governance", "action", "create-constitution"
Expand Down

0 comments on commit f216caa

Please sign in to comment.