Skip to content

Commit

Permalink
Merge pull request IntersectMBO#2301 from IntersectMBO/xfail_api_484
Browse files Browse the repository at this point in the history
Xfail on cardano-api issue 484
  • Loading branch information
mkoura authored Mar 14, 2024
2 parents 0c443a1 + 8107f3b commit 0e71f98
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions cardano_node_tests/tests/test_addr_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,23 @@

from cardano_node_tests.cluster_management import cluster_management
from cardano_node_tests.tests import common
from cardano_node_tests.utils import blockers
from cardano_node_tests.utils import clusterlib_utils
from cardano_node_tests.utils import dbsync_utils
from cardano_node_tests.utils import helpers
from cardano_node_tests.utils import submit_api
from cardano_node_tests.utils import submit_utils
from cardano_node_tests.utils.versions import VERSIONS

LOGGER = logging.getLogger(__name__)

ISSUE_API_484 = blockers.GH(
issue=484,
repo="IntersectMBO/cardano-api",
message="repeated certificates stripped from Conway transaction",
check_on_devel=False,
)


@pytest.fixture
def pool_users(
Expand Down Expand Up @@ -339,20 +349,26 @@ def test_addr_registration_certificate_order(

deposit = cluster.g_query.get_address_deposit()

tx_raw_output = clusterlib_utils.build_and_submit_tx(
cluster_obj=cluster,
name_template=temp_template,
src_address=user_payment.address,
submit_method=submit_method,
use_build_cmd=use_build_cmd,
tx_files=tx_files,
deposit=deposit,
)
try:
tx_raw_output = clusterlib_utils.build_and_submit_tx(
cluster_obj=cluster,
name_template=temp_template,
src_address=user_payment.address,
submit_method=submit_method,
use_build_cmd=use_build_cmd,
tx_files=tx_files,
deposit=deposit,
)
except (clusterlib.CLIError, submit_api.SubmitApiError) as exc:
if "(ValueNotConservedUTxO" in str(exc) and VERSIONS.transaction_era >= VERSIONS.CONWAY:
ISSUE_API_484.finish_test()
raise

# Check that the stake address is registered
assert cluster.g_query.get_stake_addr_info(
user_registered.stake.address
).address, f"Stake address is not registered: {user_registered.stake.address}"
stake_addr_info = cluster.g_query.get_stake_addr_info(user_registered.stake.address)
if not stake_addr_info and VERSIONS.transaction_era >= VERSIONS.CONWAY:
ISSUE_API_484.finish_test()
assert stake_addr_info, f"Stake address is not registered: {user_registered.stake.address}"

# Check that the balance for source address was correctly updated and that key deposit
# was needed
Expand Down

0 comments on commit 0e71f98

Please sign in to comment.