-
Notifications
You must be signed in to change notification settings - Fork 31
Build method test native tokens #3121
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
witness_count_add=len(tx_files.signing_key_files), | ||
) | ||
else: | ||
pytest.skip(f"Unsupported build method: {build_method}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception instead of skipping when calling with invalid build method.
cluster.g_transaction.submit_tx(tx_file=tx_signed, txins=tx_raw_output.txins) | ||
|
||
else: | ||
pytest.skip(f"Unsupported build method: {build_method}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception instead of skipping when calling with invalid build method.
cluster.g_transaction.submit_tx(tx_file=tx_signed, txins=tx_raw_output.txins) | ||
|
||
else: | ||
pytest.skip(f"Unsupported build method: {build_method}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception instead of skipping when calling with invalid build method.
txouts=txouts, | ||
tx_files=tx_files, | ||
) | ||
assert expected_error in str(excinfo.value) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception when calling with invalid build method.
"The transaction does not balance in its use of assets" in exc_val | ||
or "ValueNotConservedUTxO" in exc_val | ||
), exc_val | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception when calling with invalid build method.
logging.disable(logging.NOTSET) | ||
|
||
exc_val = str(excinfo.value) | ||
# build-estimate tends to throw balancing errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At this point we don't know how the error message looks like, because we are likely hitting the cli issue 1199. Let the test fail with a TODO comment, so we know what to do once the issue is fixed.
invalid_hereafter=invalid_hereafter, | ||
invalid_before=invalid_before, | ||
witness_count_add=len(tx_files.signing_key_files), | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Raise exception when calling with invalid build method.
This PR continues the cleanup of transaction building across the codebase by fully deprecating
use_build_cmd
in minting, burning, and token transfer flows. All affected tests and utility functions now rely on thebuild_method
parameter, supporting multiple build paths (BUILD
,BUILD_RAW
,BUILD_EST
) in a unified way.Key Changes
Tests
Minting & Burning Tests
test_minting_and_burning_witnesses
,test_minting_and_burning_sign
,test_minting_multiple_scripts
,test_minting_burning_diff_tokens_single_tx
,test_minting_burning_same_token_single_tx
,test_bundle_minting_and_burning_*
,test_minting_and_partial_burning
,test_minting_unicode_asset_name
to replaceuse_build_cmd
withbuild_method
.expected_fee
) to depend onbuild_method
instead of a boolean flag.BUILD_EST
(build-estimate) where relevant.Policy Tests
test_valid_policy_after
andtest_valid_policy_before
to followbuild_method
.Transfer Tests
test_transfer_tokens
,test_transfer_multiple_tokens
,test_transfer_no_ada
, andtest_transfer_invalid_token_amount
to replaceuse_build_cmd
withbuild_method
.BUILD_EST
alongside existing build methods.Reference Script Tests
test_script_reference_utxo
to branch bybuild_method
instead ofuse_build_cmd
.BUILD_EST
.Committee Tests
test_register_hot_key_no_cc_member
andtest_update_committee_action
intests_conway/test_committee.py
to removeuse_build_cmd
in favor ofbuild_method
.Utilities (
clusterlib_utils.py
)mint_or_burn_witness
andmint_or_burn_sign
use_build_cmd
parameter withbuild_method
.BUILD
,BUILD_RAW
, andBUILD_EST
.