Skip to content

Commit

Permalink
fix(tests): update error message assertions
Browse files Browse the repository at this point in the history
Updated the error message assertions in test_native_tokens.py to handle
new error messages introduced in cardano-node 10.2.0.0.
  • Loading branch information
mkoura committed Jan 15, 2025
1 parent bf50427 commit ae62a04
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions cardano_node_tests/tests/test_native_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -779,11 +779,11 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
_mint_tokens()
err_msg = str(excinfo.value)
assert (
# On cardano-node 10.0.0+
re.search(rf"MaxTxSizeUTxO .* {max_tx_size}", err_msg)
# On older cardano-node releases
"OutputTooBigUTxO" in err_msg # For `build-raw` command
or "OutputTooBigUTxO" in err_msg # For `build-raw` command
or "balance of the transaction is negative" in err_msg # For `build` command
# On cardano-node 10.0.0+
or re.search(rf"MaxTxSizeUTxO \d+ {max_tx_size}", err_msg)
), "Unexpected error message"
finally:
logging.disable(logging.NOTSET)
Expand Down Expand Up @@ -929,11 +929,11 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
_mint_tokens()
err_msg = str(excinfo.value)
assert (
# On cardano-node 10.0.0+
re.search(rf"MaxTxSizeUTxO .* {max_tx_size}", err_msg)
# On older cardano-node releases
"OutputTooBigUTxO" in err_msg # For `build-raw` command
or "OutputTooBigUTxO" in err_msg # For `build-raw` command
or "balance of the transaction is negative" in err_msg # For `build` command
# On cardano-node 10.0.0+
or re.search(rf"MaxTxSizeUTxO \d+ {max_tx_size}", err_msg)
), "Unexpected error message"
finally:
logging.disable(logging.NOTSET)
Expand Down

0 comments on commit ae62a04

Please sign in to comment.