Skip to content

Commit

Permalink
Xfail on CLI issue 800
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed Jun 21, 2024
1 parent 888afdd commit 83901dc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
6 changes: 6 additions & 0 deletions cardano_node_tests/tests/issues.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,12 @@
fixed_in="8.24.0.1", # Fixed in a release after 8.24.0.0
message="Conway era fields shown in Babbage Tx.",
)
cli_800 = blockers.GH(
issue=800,
repo="IntersectMBO/cardano-cli",
fixed_in="8.24.0.1", # Fixed in a release after 8.24.0.0
message="Datum not checked for PlutusV1 and PlutusV2 spending scripts.",
)

consensus_973 = blockers.GH(
issue=973,
Expand Down
18 changes: 13 additions & 5 deletions cardano_node_tests/tests/tests_plutus/test_spend_datum_build.py
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ def test_no_datum_txout(
)

txouts = [
clusterlib.TxOut(address=redeem_address, amount=amount + redeem_cost.fee),
clusterlib.TxOut(address=redeem_address, amount=amount + redeem_cost.fee + 5_000_000),
clusterlib.TxOut(address=payment_addr.address, amount=redeem_cost.collateral),
]
tx_files = clusterlib.TxFiles(signing_key_files=[payment_addr.skey_file])
Expand All @@ -259,7 +259,8 @@ def test_no_datum_txout(
script_utxos = clusterlib.filter_utxos(utxos=out_utxos, utxo_ix=utxo_ix_offset)
collateral_utxos = clusterlib.filter_utxos(utxos=out_utxos, utxo_ix=utxo_ix_offset + 1)

with pytest.raises(clusterlib.CLIError) as excinfo:
err_str = ""
try:
spend_build._build_spend_locked_txin(
temp_template=temp_template,
cluster_obj=cluster,
Expand All @@ -271,7 +272,10 @@ def test_no_datum_txout(
amount=amount,
submit_tx=False,
)
err_str = str(excinfo.value)
except clusterlib.CLIError as exc:
err_str = str(exc)
else:
issues.cli_800.finish_test()

if address_type == "script_address":
assert "txin does not have a script datum" in err_str, err_str
Expand Down Expand Up @@ -362,7 +366,8 @@ def test_unlock_tx_wrong_datum(
execution_cost=plutus_common.ALWAYS_SUCCEEDS[plutus_version].execution_cost,
)

with pytest.raises(clusterlib.CLIError) as excinfo:
err_str = ""
try:
spend_build._build_spend_locked_txin(
temp_template=temp_template,
cluster_obj=cluster,
Expand All @@ -374,8 +379,11 @@ def test_unlock_tx_wrong_datum(
amount=2_000_000,
submit_tx=False,
)
except clusterlib.CLIError as exc:
err_str = str(exc)
else:
issues.cli_800.finish_test()

err_str = str(excinfo.value)
assert (
"The Plutus script witness has the wrong datum (according to the UTxO)." in err_str
), err_str
Expand Down

0 comments on commit 83901dc

Please sign in to comment.