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 Nov 14, 2023
1 parent 02d1f4b commit 3bd065b
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import Test.Cardano.CLI.Util

import Hedgehog (Property)
import qualified Hedgehog as H
import qualified Hedgehog.Internal.Property as H
import qualified Hedgehog.Extras as H
import qualified Hedgehog.Internal.Property as H

{- HLINT ignore "Use camelCase" -}

Expand All @@ -25,7 +25,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 @@ -117,11 +117,11 @@ hprop_golden_governance_drep_metadata_hash = propertyOnce . H.moduleWorkspace "t
, "--out-file", outputDRepMetadataHash
]

H.diffFileVsGoldenFile goldenDRepMetadataHash outputDRepMetadataHash
H.diffFileVsGoldenFile outputDRepMetadataHash goldenDRepMetadataHash

hprop_golden_governance_drep_registration_certificate :: Property
hprop_golden_governance_drep_registration_certificate = propertyOnce . H.moduleWorkspace "tmp" $ \tempDir -> do
drepKeyFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/drep/drep.vkey"
drepKeyFile <- noteInputFile "test/cardano-cli-golden/files/input/governance/drep/drep.vkey"
goldenFile <- noteInputFile "test/cardano-cli-golden/files/golden/governance/drep/drep_registration_certificate.json"

outFile <- H.noteTempFile tempDir "drep-reg-cert.txt"
Expand All @@ -135,4 +135,4 @@ hprop_golden_governance_drep_registration_certificate = propertyOnce . H.moduleW
, "--out-file", outFile
]

H.diffFileVsGoldenFile goldenFile outFile
H.diffFileVsGoldenFile outFile goldenFile
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
@@ -1 +1 @@
c9c4e907d758c260823be6999dbbcf2826ac1cdc0fe5f0c9394ac7fa17c74811
c9c4e907d758c260823be6999dbbcf2826ac1cdc0fe5f0c9394ac7fa17c74811
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 3bd065b

Please sign in to comment.