Skip to content

Commit 14b6489

Browse files
authored
Merge pull request #2874 from IntersectMBO/new_exp_err_msgs
fix(tests): update error message assertions
2 parents bf50427 + ae62a04 commit 14b6489

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

cardano_node_tests/tests/test_native_tokens.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -779,11 +779,11 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
779779
_mint_tokens()
780780
err_msg = str(excinfo.value)
781781
assert (
782+
# On cardano-node 10.0.0+
783+
re.search(rf"MaxTxSizeUTxO .* {max_tx_size}", err_msg)
782784
# On older cardano-node releases
783-
"OutputTooBigUTxO" in err_msg # For `build-raw` command
785+
or "OutputTooBigUTxO" in err_msg # For `build-raw` command
784786
or "balance of the transaction is negative" in err_msg # For `build` command
785-
# On cardano-node 10.0.0+
786-
or re.search(rf"MaxTxSizeUTxO \d+ {max_tx_size}", err_msg)
787787
), "Unexpected error message"
788788
finally:
789789
logging.disable(logging.NOTSET)
@@ -929,11 +929,11 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
929929
_mint_tokens()
930930
err_msg = str(excinfo.value)
931931
assert (
932+
# On cardano-node 10.0.0+
933+
re.search(rf"MaxTxSizeUTxO .* {max_tx_size}", err_msg)
932934
# On older cardano-node releases
933-
"OutputTooBigUTxO" in err_msg # For `build-raw` command
935+
or "OutputTooBigUTxO" in err_msg # For `build-raw` command
934936
or "balance of the transaction is negative" in err_msg # For `build` command
935-
# On cardano-node 10.0.0+
936-
or re.search(rf"MaxTxSizeUTxO \d+ {max_tx_size}", err_msg)
937937
), "Unexpected error message"
938938
finally:
939939
logging.disable(logging.NOTSET)

0 commit comments

Comments
 (0)