Skip to content

Commit

Permalink
Merge pull request #2871 from IntersectMBO/update_test_tx_view
Browse files Browse the repository at this point in the history
feat: update tx view golden files
  • Loading branch information
mkoura authored Jan 9, 2025
2 parents 3f3c39e + 90c1764 commit bffa680
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"auxiliary scripts": null,
"certificates": null,
"collateral inputs": [],
"datums": [],
"era": "Babbage",
"fee": "190279 Lovelace",
"inputs": [
Expand Down Expand Up @@ -32,6 +33,7 @@
"reference inputs": [],
"required signers (payment key hashes needed for scripts)": null,
"return collateral": null,
"scripts": [],
"total collateral": null,
"update proposal": null,
"validity range": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"auxiliary scripts": null,
"certificates": null,
"collateral inputs": [],
"datums": [],
"era": "Babbage",
"fee": "190279 Lovelace",
"inputs": [
Expand Down Expand Up @@ -32,6 +33,7 @@
"reference inputs": [],
"required signers (payment key hashes needed for scripts)": null,
"return collateral": null,
"scripts": [],
"total collateral": null,
"update proposal": null,
"validity range": {
Expand Down
8 changes: 5 additions & 3 deletions cardano_node_tests/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,19 +180,21 @@ def test_tx_view(self, cluster: clusterlib.ClusterLib):
common.get_test_id(cluster)

tx_body = cluster.g_transaction.view_tx(tx_body_file=self.TX_BODY_FILE)
tx = cluster.g_transaction.view_tx(tx_file=self.TX_FILE)

if '"redeemers":' not in tx_body:
pytest.skip("unsupported old output format")
if '"datums":' not in tx_body:
pytest.skip("unsupported old output format")

with open(self.TX_BODY_OUT_JSON, encoding="utf-8") as infile:
tx_body_golden = infile.read()
assert tx_body == tx_body_golden.strip()

tx = cluster.g_transaction.view_tx(tx_file=self.TX_FILE)

if '"governance actions":' in tx:
issues.cli_799.finish_test()

assert tx_body == tx_body_golden.strip()

with open(self.TX_OUT_JSON, encoding="utf-8") as infile:
tx_golden = infile.read()
assert tx == tx_golden.strip()
Expand Down

0 comments on commit bffa680

Please sign in to comment.