1
{-# LANGUAGE OverloadedStrings #-}
3
module Test.Golden.Shelley.Transaction.CreateWitness
4
( golden_shelleyTransactionSigningKeyWitness
8
import Prelude (String)
10
import Hedgehog (Property)
13
import qualified Hedgehog.Extras.Test.Base as H
14
import qualified Hedgehog.Extras.Test.File as H
16
{- HLINT ignore "Use camelCase" -}
19
txIn = "2392d2b1200b5139fe555c81261697b29a8ccf561c5c783d46e78a479d977053#0"
22
txOut = "addr1q94cxl99qvtwunsqqv6g9mgj3zrawtpt4edsgwxkjtwpy5dsezcht90tmwfur7t5hc9fk8hjd3r5vjwec2h8vmk3xh8s7er7t3+100"
24
golden_shelleyTransactionSigningKeyWitness :: Property
25
golden_shelleyTransactionSigningKeyWitness = propertyOnce $ H.moduleWorkspace "tmp" $ \tempDir -> do
26
txBodyOutFile <- noteTempFile tempDir "tx-body-out"
28
-- Create tx body file
30
[ "transaction","build-raw"
34
, "--invalid-hereafter", "60"
36
, "--tx-body-file", txBodyOutFile
39
-- Create all multisig witness
40
witnessOutFile <- noteTempFile tempDir "signingkey-witness"
41
signingKeyFile <- noteInputFile "test/data/golden/shelley/keys/payment_keys/signing_key"
43
[ "transaction","witness"
44
, "--tx-body-file", txBodyOutFile
45
, "--signing-key-file", signingKeyFile
47
, "--out-file", witnessOutFile
50
H.assertFileOccurences 1 "TxWitnessShelley" witnessOutFile
51
H.assertEndsWithSingleNewline txBodyOutFile