Skip to content

Commit 90c1764

Browse files
committed
feat: update tx view golden files
- Updated test_tx_metadata_both_tx_body_json.out to include "datums" and "scripts" fields. - Updated test_tx_metadata_both_tx_json.out to include "datums" and "scripts" fields. - Modified test_cli.py to handle new "datums" field and ensure compatibility with the updated output format.
1 parent 3f3c39e commit 90c1764

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

cardano_node_tests/tests/data/test_tx_metadata_both_tx_body_json.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"auxiliary scripts": null,
33
"certificates": null,
44
"collateral inputs": [],
5+
"datums": [],
56
"era": "Babbage",
67
"fee": "190279 Lovelace",
78
"inputs": [
@@ -32,6 +33,7 @@
3233
"reference inputs": [],
3334
"required signers (payment key hashes needed for scripts)": null,
3435
"return collateral": null,
36+
"scripts": [],
3537
"total collateral": null,
3638
"update proposal": null,
3739
"validity range": {

cardano_node_tests/tests/data/test_tx_metadata_both_tx_json.out

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"auxiliary scripts": null,
33
"certificates": null,
44
"collateral inputs": [],
5+
"datums": [],
56
"era": "Babbage",
67
"fee": "190279 Lovelace",
78
"inputs": [
@@ -32,6 +33,7 @@
3233
"reference inputs": [],
3334
"required signers (payment key hashes needed for scripts)": null,
3435
"return collateral": null,
36+
"scripts": [],
3537
"total collateral": null,
3638
"update proposal": null,
3739
"validity range": {

cardano_node_tests/tests/test_cli.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,19 +180,21 @@ def test_tx_view(self, cluster: clusterlib.ClusterLib):
180180
common.get_test_id(cluster)
181181

182182
tx_body = cluster.g_transaction.view_tx(tx_body_file=self.TX_BODY_FILE)
183-
tx = cluster.g_transaction.view_tx(tx_file=self.TX_FILE)
184183

185184
if '"redeemers":' not in tx_body:
186185
pytest.skip("unsupported old output format")
186+
if '"datums":' not in tx_body:
187+
pytest.skip("unsupported old output format")
187188

188189
with open(self.TX_BODY_OUT_JSON, encoding="utf-8") as infile:
189190
tx_body_golden = infile.read()
191+
assert tx_body == tx_body_golden.strip()
192+
193+
tx = cluster.g_transaction.view_tx(tx_file=self.TX_FILE)
190194

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

194-
assert tx_body == tx_body_golden.strip()
195-
196198
with open(self.TX_OUT_JSON, encoding="utf-8") as infile:
197199
tx_golden = infile.read()
198200
assert tx == tx_golden.strip()

0 commit comments

Comments
 (0)