From 77236d7d82b70d6acd313dfe5c2a5549344d31a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Hurlin?= Date: Thu, 16 Nov 2023 15:49:37 +0100 Subject: [PATCH] Adapt tests --- .../Test/Golden/Governance/Action.hs | 19 ++++++++++++++----- .../view/create-constitution.action.view | 4 ++-- 2 files changed, 16 insertions(+), 7 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 3b7059da0b..9bc61d6816 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 @@ -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" @@ -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" @@ -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" @@ -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" diff --git a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/view/create-constitution.action.view b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/view/create-constitution.action.view index 0a21699f6f..2dcdf99ead 100644 --- a/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/view/create-constitution.action.view +++ b/cardano-cli/test/cardano-cli-golden/files/golden/governance/action/view/create-constitution.action.view @@ -9,8 +9,8 @@ null, { "anchor": { - "dataHash": "42cb2e410023679943d26c23ce2b5046eb7dfc5883c69fb91cc8a3c9c9a99a99", - "url": "constitution-dummy-url" + "dataHash": "913844423a72d4ff4cffe1ca2bed8e7f354dba7563df9e630e5b6a86fa72659a", + "url": "http://my-great-constitution.rocks" } } ],