Skip to content

Commit 91f063e

Browse files
committed
feat(tests): add preprod pool IDs for delegation tests
Added a new set of preprod pool IDs to the delegation tests in `cardano_node_tests/tests/delegation.py`. This allows the tests to use hardcoded pool IDs for the preprod testnet, similar to the existing setup for the preview testnet.
1 parent 430cd5d commit 91f063e

File tree

1 file changed

+15
-2
lines changed

1 file changed

+15
-2
lines changed

cardano_node_tests/tests/delegation.py

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@
2525
"pool1y0uxkqyplyx6ld25e976t0s35va3ysqcscatwvy2sd2cwcareq7", # HODLr
2626
)
2727

28+
PREPROD_POOL_IDS = (
29+
"pool1nmfr5j5rnqndprtazre802glpc3h865sy50mxdny65kfgf3e5eh", # GRADA
30+
"pool132jxjzyw4awr3s75ltcdx5tv5ecv6m042306l630wqjckhfm32r", # ADACT
31+
"pool10dtwvn64akqjdtn9d4pd2mnhpxfgp76hvsfkgmfwugrsxef3y2p", # RABIT
32+
"pool1tjc56tq7adk64nnq2ldu3f4nh6sxkphhmnejlu67ux7acq8y7rx", # PSBT
33+
"pool1z05xqzuxnpl8kg8u2wwg8ftng0fwtdluv3h20ruryfqc5gc3efl", # HODLr
34+
)
35+
2836

2937
@dataclasses.dataclass(frozen=True, order=True)
3038
class AddressRecordScript:
@@ -77,10 +85,15 @@ def cluster_and_pool(
7785
cluster_obj: clusterlib.ClusterLib = cluster_manager.get(use_resources=use_resources)
7886

7987
# Getting ledger state on official testnet is too expensive,
80-
# use one of hardcoded pool IDs if possible
88+
# use one of hardcoded pool IDs if possible.
89+
testnet_pools = None
8190
if cluster_type.testnet_type == cluster_nodes.Testnets.preview:
91+
testnet_pools = PREVIEW_POOL_IDS
92+
elif cluster_type.testnet_type == cluster_nodes.Testnets.preprod:
93+
testnet_pools = PREPROD_POOL_IDS
94+
if testnet_pools:
8295
stake_pools = cluster_obj.g_query.get_stake_pools()
83-
for pool_id in PREVIEW_POOL_IDS:
96+
for pool_id in testnet_pools:
8497
if pool_id in stake_pools:
8598
return cluster_obj, pool_id
8699

0 commit comments

Comments
 (0)