Skip to content

Commit

Permalink
Change tests to use "debug transaction view"
Browse files Browse the repository at this point in the history
  • Loading branch information
smelc committed Jul 17, 2024
1 parent 371bc75 commit d7c1b56
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions cardano-cli/test/cardano-cli-golden/Test/Golden/TxView.hs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ _hprop_golden_view_byron_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
H.diffVsGoldenFile result $ goldenDir </> "byron/transaction-view.out"

-- TODO: Expose command to view byron tx files
Expand All @@ -81,7 +81,7 @@ _hprop_golden_view_byron_json_default =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile]
H.diffVsGoldenFile result $ goldenDir </> "byron/transaction-view-json.out"

hprop_golden_view_shelley_yaml :: Property
Expand Down Expand Up @@ -193,7 +193,7 @@ hprop_golden_view_shelley_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]

H.diffVsGoldenFile result $ goldenDir </> "shelley/transaction-view.out"

Expand Down Expand Up @@ -229,7 +229,7 @@ hprop_golden_view_allegra_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
H.diffVsGoldenFile result $ goldenDir </> "allegra/transaction-view.out"

hprop_golden_view_mary_yaml :: Property
Expand Down Expand Up @@ -303,7 +303,7 @@ hprop_golden_view_mary_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
H.diffVsGoldenFile result $ goldenDir </> "mary/transaction-view.out"

hprop_golden_view_redeemer :: Property
Expand All @@ -316,7 +316,7 @@ hprop_golden_view_redeemer = do
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]

H.diffVsGoldenFile result $ goldenDir </> "babbage/transaction-view-redeemer.out"
where
Expand Down Expand Up @@ -354,14 +354,20 @@ hprop_golden_view_metadata = propertyOnce $ moduleWorkspace "tmp" $ \tempDir ->
makeTxBody TxMetadataJsonNoSchema transactionBodyMetaNoSchema
resultNoSchema <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyMetaNoSchema, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyMetaNoSchema, "--output-yaml"]
H.diffVsGoldenFile resultNoSchema $ goldenDir </> "babbage/transaction-view-metadata-noschema.out"

transactionBodyMetaDetailedSchema <- noteTempFile tempDir "transaction-body-detailedschema"
makeTxBody TxMetadataJsonDetailedSchema transactionBodyMetaDetailedSchema
resultDetailedSchema <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyMetaDetailedSchema, "--output-yaml"]
[ "debug"
, "transaction"
, "view"
, "--tx-body-file"
, transactionBodyMetaDetailedSchema
, "--output-yaml"
]
H.diffVsGoldenFile resultDetailedSchema $
goldenDir </> "babbage/transaction-view-metadata-detailedschema.out"
where
Expand Down Expand Up @@ -463,7 +469,7 @@ hprop_golden_view_alonzo_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-body-file", transactionBodyFile, "--output-yaml"]
H.diffVsGoldenFile result $ goldenDir </> "alonzo/transaction-view.out"

-- | Execute me with:
Expand Down Expand Up @@ -495,7 +501,7 @@ hprop_golden_view_alonzo_signed_yaml =
-- View transaction body
result <-
execCardanoCLI
["transaction", "view", "--tx-file", transactionFile, "--output-yaml"]
["debug", "transaction", "view", "--tx-file", transactionFile, "--output-yaml"]

H.diffVsGoldenFile result (golden </> "signed-transaction-view.out")

Expand All @@ -509,7 +515,7 @@ hprop_golden_view_conway_three_votes =

result <-
execCardanoCLI
["transaction", "view", "--tx-file", input </> "tx-three-votes.json", "--output-json"]
["debug", "transaction", "view", "--tx-file", input </> "tx-three-votes.json", "--output-json"]

H.diffVsGoldenFile result (golden </> "tx-three-votes-view.out.json")

Expand All @@ -523,6 +529,6 @@ hprop_golden_view_conway_proposal =

result <-
execCardanoCLI
["transaction", "view", "--tx-file", input </> "tx-proposal.json", "--output-json"]
["debug", "transaction", "view", "--tx-file", input </> "tx-proposal.json", "--output-json"]

H.diffVsGoldenFile result (golden </> "tx-proposal.out.json")

0 comments on commit d7c1b56

Please sign in to comment.