Skip to content

Commit 4a5f988

Browse files
authored
Merge pull request #3293 from IntersectMBO/amend_expected_error_balance_estimate
fix: handle new error message for negative tx balance
2 parents b56e5e3 + 6790676 commit 4a5f988

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

cardano_node_tests/tests/test_addr_registration.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,11 +309,12 @@ def test_addr_registration_certificate_order(
309309
deposit=deposit,
310310
)
311311
except (clusterlib.CLIError, submit_api.SubmitApiError) as exc:
312-
if "(ValueNotConservedUTxO" in str(exc) and VERSIONS.transaction_era >= VERSIONS.CONWAY:
312+
str_exc = str(exc)
313+
if "(ValueNotConservedUTxO" in str_exc and VERSIONS.transaction_era >= VERSIONS.CONWAY:
313314
issues.api_484.finish_test()
314-
if (
315-
build_method == clusterlib_utils.BuildMethods.BUILD_EST
316-
and "does not balance in its use of assets" in str(exc)
315+
if build_method == clusterlib_utils.BuildMethods.BUILD_EST and (
316+
"The transaction balance is negative" in str_exc
317+
or "does not balance in its use of assets" in str_exc
317318
):
318319
issues.cli_1199.finish_test()
319320
raise

cardano_node_tests/tests/test_tx_basic.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -508,7 +508,11 @@ def test_transfer_all_build_estimate(
508508
tx_files=tx_files,
509509
)
510510
except clusterlib.CLIError as exc:
511-
if "balance of the transaction is negative" in str(exc):
511+
str_exc = str(exc)
512+
if (
513+
"The transaction balance is negative" in str_exc
514+
or "balance of the transaction is negative" in str_exc
515+
):
512516
issues.cli_1199.finish_test()
513517
raise
514518

0 commit comments

Comments
 (0)