From f216caaa5ddb82aa1180036d0bb06a3a6a240afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 16 Nov 2023 11:01:32 +0100 Subject: [PATCH] Make an existing test use the new --out-file flag --- .../Test/Golden/Governance/Action.hs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs b/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs index d99d27b65a..3b7059da0b 100644 --- a/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs +++ b/cardano-cli/test/cardano-cli-golden/Test/Golden/Governance/Action.hs @@ -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 = @@ -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"