|
19 | 19 | from cardano_node_tests.utils import clusterlib_utils |
20 | 20 | from cardano_node_tests.utils import dbsync_utils |
21 | 21 | from cardano_node_tests.utils import helpers |
| 22 | +from cardano_node_tests.utils.versions import VERSIONS |
22 | 23 |
|
23 | 24 | LOGGER = logging.getLogger(__name__) |
24 | 25 |
|
@@ -196,14 +197,15 @@ def test_no_datum_txout( |
196 | 197 | ): |
197 | 198 | """Test using UTxO without datum hash in place of locked UTxO. |
198 | 199 |
|
199 | | - Expect failure. |
| 200 | + Expect failure, unless in era >= Conway. |
200 | 201 |
|
201 | 202 | * create a Tx output without a datum hash |
202 | 203 | * try to spend the UTxO like it was locked Plutus UTxO |
203 | 204 | * check that the expected error was raised |
204 | 205 | """ |
205 | 206 | temp_template = common.get_test_id(cluster) |
206 | 207 | amount = 2_000_000 |
| 208 | + in_conway_plus = VERSIONS.transaction_era >= VERSIONS.CONWAY |
207 | 209 |
|
208 | 210 | payment_addr = payment_addrs[0] |
209 | 211 | dst_addr = payment_addrs[1] |
@@ -268,15 +270,17 @@ def test_no_datum_txout( |
268 | 270 | except clusterlib.CLIError as exc: |
269 | 271 | err_str = str(exc) |
270 | 272 | else: |
271 | | - issues.cli_800.finish_test() |
272 | | - |
273 | | - if address_type == "script_address": |
274 | | - assert "txin does not have a script datum" in err_str, err_str |
275 | | - else: |
276 | | - assert ( |
277 | | - "not a Plutus script witnessed tx input" in err_str |
278 | | - or "points to a script hash that is not known" in err_str |
279 | | - ), err_str |
| 273 | + if not in_conway_plus: |
| 274 | + issues.cli_800.finish_test() |
| 275 | + |
| 276 | + if not in_conway_plus: |
| 277 | + if address_type == "script_address": |
| 278 | + assert "txin does not have a script datum" in err_str, err_str |
| 279 | + else: |
| 280 | + assert ( |
| 281 | + "not a Plutus script witnessed tx input" in err_str |
| 282 | + or "points to a script hash that is not known" in err_str |
| 283 | + ), err_str |
280 | 284 |
|
281 | 285 | # Check expected fees |
282 | 286 | expected_fee_fund = 199_087 |
@@ -335,7 +339,7 @@ def test_unlock_tx_wrong_datum( |
335 | 339 | ): |
336 | 340 | """Test locking a Tx output and try to spend it with a wrong datum. |
337 | 341 |
|
338 | | - Expect failure. |
| 342 | + Expect failure, unless in era >= Conway. |
339 | 343 | """ |
340 | 344 | temp_template = common.get_test_id(cluster) |
341 | 345 |
|
@@ -378,6 +382,8 @@ def test_unlock_tx_wrong_datum( |
378 | 382 | except clusterlib.CLIError as exc: |
379 | 383 | err_str = str(exc) |
380 | 384 | else: |
| 385 | + if VERSIONS.transaction_era >= VERSIONS.CONWAY: |
| 386 | + return |
381 | 387 | issues.cli_800.finish_test() |
382 | 388 |
|
383 | 389 | assert ( |
|
0 commit comments