From afedf02c5106dd074017e874dcfa5bdd1f3757e6 Mon Sep 17 00:00:00 2001 From: Martin Kourim Date: Thu, 9 Apr 2026 13:45:30 +0200 Subject: [PATCH] fix(tests): use minimal default collateral in negative Plutus tests Set `collateral_fraction_offset=0.0` in negative minting and spending Plutus test cases to ensure tests use the minimal default collateral amount. This brings collateral UTxO amounts down and leads to the expected failure. --- .../tests/tests_plutus/test_mint_negative_raw.py | 5 ++++- .../tests/tests_plutus/test_spend_negative_raw.py | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/cardano_node_tests/tests/tests_plutus/test_mint_negative_raw.py b/cardano_node_tests/tests/tests_plutus/test_mint_negative_raw.py index 989cc4087..2a13bf457 100644 --- a/cardano_node_tests/tests/tests_plutus/test_mint_negative_raw.py +++ b/cardano_node_tests/tests/tests_plutus/test_mint_negative_raw.py @@ -752,7 +752,10 @@ def test_minting_with_insufficient_collateral( execution_cost = dataclasses.replace(plutus_v_record.execution_cost, fixed_cost=2_000_000) minting_cost = plutus_common.compute_cost( - execution_cost=execution_cost, protocol_params=cluster.g_query.get_protocol_params() + execution_cost=execution_cost, + protocol_params=cluster.g_query.get_protocol_params(), + # Will use the minimal default collateral amount + collateral_fraction_offset=0.0, ) # Step 1: fund the token issuer diff --git a/cardano_node_tests/tests/tests_plutus/test_spend_negative_raw.py b/cardano_node_tests/tests/tests_plutus/test_spend_negative_raw.py index cc58f1aa6..61ff94dec 100644 --- a/cardano_node_tests/tests/tests_plutus/test_spend_negative_raw.py +++ b/cardano_node_tests/tests/tests_plutus/test_spend_negative_raw.py @@ -443,7 +443,8 @@ def test_collateral_percent( dst_addr=payment_addrs[1], plutus_op=plutus_op, amount=amount, - collateral_fraction_offset=0.9, + # Will use the minimal default collateral amount + collateral_fraction_offset=0.0, ) with pytest.raises(clusterlib.CLIError) as excinfo: