Skip to content

Commit

Permalink
Move input files out of golden directory
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jan 5, 2024
1 parent f8a9bd9 commit 02b0969
Show file tree
Hide file tree
Showing 14 changed files with 19 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ hprop_golden_governanceVerifyPoll = propertyOnce $ do
pollFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/polls/basic.json"
txFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/verify/valid"
goldenVkFile <- VerificationKeyFilePath . File <$>
H.note "test/cardano-cli-golden/files/golden/governance/cold.vk"
H.note "test/cardano-cli-golden/files/input/governance/cold.vk"

stdout <- BSC.pack <$> execCardanoCLI
[ "babbage", "governance", "verify-poll"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ hprop_golden_conway_stakeaddress_delegate_pool_and_drep =
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
vkeyFile <- noteInputFile "test/cardano-cli-golden/files/input/conway/stake.vkey"
vkeyPool <- noteInputFile "test/cardano-cli-golden/files/input/conway/poolCold.vkey"
vkeyDrep <- noteInputFile "test/cardano-cli-golden/files/golden/governance/drep/drep.vkey"
vkeyDrep <- noteInputFile "test/cardano-cli-golden/files/input/governance/drep/drep.vkey"
delegFile <- H.noteTempFile tempDir "deleg"
delegGold <- H.note "test/cardano-cli-golden/files/golden/governance/stakeaddress/poolAndDrepVkeyDeleg.cert"

Expand All @@ -95,4 +95,4 @@ hprop_golden_conway_stakeaddress_delegate_pool_and_drep =
, "--out-file", delegFile
]

H.diffFileVsGoldenFile delegFile delegGold
H.diffFileVsGoldenFile delegFile delegGold
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ hprop_golden_governance_governance_vote_create =
hprop_golden_governance_governance_vote_view_json_stdout :: Property
hprop_golden_governance_governance_vote_view_json_stdout =
propertyOnce $ do
voteFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/vote/vote"
voteFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/vote/vote"
voteViewGold <- H.note "test/cardano-cli-golden/files/golden/governance/vote/voteViewJSON"
voteView <- execCardanoCLI
[ "conway", "governance", "vote", "view"
Expand All @@ -45,7 +45,7 @@ hprop_golden_governance_governance_vote_view_json_stdout =
hprop_golden_governance_governance_vote_view_json_outfile :: Property
hprop_golden_governance_governance_vote_view_json_outfile =
propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
voteFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/vote/vote"
voteFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/vote/vote"
voteViewFile <- H.noteTempFile tempDir "voteView"
voteViewGold <- H.note "test/cardano-cli-golden/files/golden/governance/vote/voteViewJSON"
void $ execCardanoCLI
Expand All @@ -59,7 +59,7 @@ hprop_golden_governance_governance_vote_view_json_outfile =
hprop_golden_governance_governance_vote_view_yaml :: Property
hprop_golden_governance_governance_vote_view_yaml =
propertyOnce $ do
voteFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/vote/vote"
voteFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/vote/vote"
voteViewGold <- H.note "test/cardano-cli-golden/files/golden/governance/vote/voteViewYAML"
voteView <- execCardanoCLI
[ "conway", "governance", "vote", "view"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,15 @@ module Test.Golden.Shelley.Genesis.InitialTxIn where
import Test.Cardano.CLI.Util

import Hedgehog (Property)
import qualified Hedgehog.Extras as H
import qualified Hedgehog.Extras.Test.Golden as H

{- HLINT ignore "Use camelCase" -}

hprop_golden_shelleyGenesisInitialTxIn :: Property
hprop_golden_shelleyGenesisInitialTxIn = propertyOnce $ do
verificationKeyFile <- noteInputFile "test/cardano-cli-golden/files/input/shelley/keys/genesis_verification_keys/genesis-utxo.vkey"
goldenUtxoHashFile <- noteInputFile "test/cardano-cli-golden/files/golden/shelley/keys/genesis_utxo_hashes/utxo_hash"
goldenUtxoHashFile <- H.note "test/cardano-cli-golden/files/golden/shelley/keys/genesis_utxo_hashes/utxo_hash"
utxoHash <- execCardanoCLI
[ "genesis","initial-txin"
, "--testnet-magic", "16"
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
c9c4e907d758c260823be6999dbbcf2826ac1cdc0fe5f0c9394ac7fa17c74811
c9c4e907d758c260823be6999dbbcf2826ac1cdc0fe5f0c9394ac7fa17c74811
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"type": "Governance voting procedures",
"description": "",
"cborHex": "a18202581ceb09d5556a8bce421074e394d02c79ced96741657b4cf7ca8995294da1825820b1015258a99351c143a7a40b7b58f033ace10e3cc09c67780ed5b2b0992aa60a05820182781868747470733a2f2f6578616d706c652e636f6d2f766f746558206163683a90d8cb460a38cdcf0d7bab286f0f004ec6e761dc670c2ca4d3709a17"
}
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ import qualified Hedgehog.Extras.Test.File as H
-- | We test to make sure that we can deserialize a tx body in the intermediate format
hprop_backwardsCompatibleCliFormat :: Property
hprop_backwardsCompatibleCliFormat = propertyOnce $ H.moduleWorkspace "tmp" $ \tempDir -> do
txBodyFile <- noteInputFile "test/cardano-cli-test/files/golden/babbage/deprecated-cli-format.body"
witness <- noteInputFile "test/cardano-cli-test/files/golden/babbage/tx-key-witness"
initialUtxo1SigningKeyFile <- noteInputFile "test/cardano-cli-test/files/golden/shelley/keys/payment_keys/signing_key"
txBodyFile <- noteInputFile "test/cardano-cli-test/files/input/babbage/deprecated-cli-format.body"
witness <- noteInputFile "test/cardano-cli-test/files/input/babbage/tx-key-witness"
initialUtxo1SigningKeyFile <- noteInputFile "test/cardano-cli-test/files/input/shelley/keys/payment_keys/signing_key"
signedTransactionFile <- noteTempFile tempDir "signed.tx"


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@ hprop_createTransaction = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> d
void $ execCardanoCLI
[ "transaction", "build-raw"
, "--tx-in", "91999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c3#0"
, "--auxiliary-script-file", "test/cardano-cli-test/files/golden/shelley/multisig/scripts/all"
, "--auxiliary-script-file", "test/cardano-cli-test/files/input/shelley/multisig/scripts/all"
, "--tx-in", "91999ea21177b33ebe6b8690724a0c026d410a11ad7521caa350abdafa5394c3#0"
, "--auxiliary-script-file", "test/cardano-cli-test/files/golden/shelley/multisig/scripts/all"
, "--auxiliary-script-file", "test/cardano-cli-test/files/input/shelley/multisig/scripts/all"
, "--tx-out", "addr1v9wmu83pzajplrtpsq6tsqdgwr98x888trpmah2u0ezznsge7del3+100000000"
, "--fee", "1000000"
, "--invalid-hereafter", "500000"
Expand Down

0 comments on commit 02b0969

Please sign in to comment.