Skip to content

Commit

Permalink
feat: randomly select faucet address for funding
Browse files Browse the repository at this point in the history
  • Loading branch information
mkoura committed Oct 2, 2024
1 parent d73be75 commit 17f7c69
Show file tree
Hide file tree
Showing 70 changed files with 123 additions and 123 deletions.
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def detect_fork(
tx_raw_output = clusterlib_utils.fund_from_faucet(
payment_rec,
cluster_obj=cluster_obj,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=2_000_000,
)
assert tx_raw_output
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ def delegate_stake_addr(
clusterlib_utils.fund_from_faucet(
pool_user.payment,
cluster_obj=cluster_obj,
faucet_data=addrs_data["user1"],
all_faucets=addrs_data,
amount=amount,
)

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_addr_registration.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def pool_users(
clusterlib_utils.fund_from_faucet(
created_users[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return created_users
Expand Down
4 changes: 2 additions & 2 deletions cardano_node_tests/tests/test_blocks.py
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
*addrs,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)
return addrs

Expand Down Expand Up @@ -404,7 +404,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
*addrs,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)
return addrs

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_chain_transactions.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def get_payment_addr(
clusterlib_utils.fund_from_faucet(
addr,
cluster_obj=cluster_obj,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=amount,
)

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -721,7 +721,7 @@ def test_pretty_utxo(
clusterlib_utils.fund_from_faucet(
payment_addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=amount1 + amount2 + 10_000_000,
)

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_dbsync.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ def test_reconnect_dbsync(
clusterlib_utils.fund_from_faucet(
payment_addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=10_000_000,
)

Expand Down
8 changes: 4 additions & 4 deletions cardano_node_tests/tests/test_delegation.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def pool_users(
clusterlib_utils.fund_from_faucet(
created_users[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return created_users
Expand Down Expand Up @@ -127,7 +127,7 @@ def pool_users_cluster_and_pool(
clusterlib_utils.fund_from_faucet(
created_users[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return created_users
Expand Down Expand Up @@ -302,7 +302,7 @@ def _get_pool_users(
clusterlib_utils.fund_from_faucet(
*pool_users,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

# Step: Delegate the stake addresses to 2 different pools
Expand Down Expand Up @@ -431,7 +431,7 @@ def test_deregister_delegated(
clusterlib_utils.fund_from_faucet(
*payment_addr_recs,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

pool_user = clusterlib.PoolUser(payment=payment_addr_recs[1], stake=stake_addr_rec)
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_env_network_id.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=100_000_000,
)
return addrs
Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_governance.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ def payment_addr(
clusterlib_utils.fund_from_faucet(
addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=amount,
)

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_mir_certs.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ def pool_users(
clusterlib_utils.fund_from_faucet(
*created_users,
cluster_obj=cluster_pots,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return created_users
Expand Down
12 changes: 6 additions & 6 deletions cardano_node_tests/tests/test_native_tokens.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def issuers_addrs(
clusterlib_utils.fund_from_faucet(
addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=9_000_000,
)

Expand Down Expand Up @@ -773,7 +773,7 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
clusterlib_utils.fund_from_faucet(
token_mint_addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=300_000_000,
)

Expand All @@ -799,7 +799,7 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
clusterlib_utils.fund_from_faucet(
token_mint_addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=40_000_000,
)

Expand Down Expand Up @@ -918,7 +918,7 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
clusterlib_utils.fund_from_faucet(
token_mint_addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=300_000_000,
)

Expand All @@ -944,7 +944,7 @@ def _mint_tokens() -> clusterlib.TxRawOutput:
clusterlib_utils.fund_from_faucet(
token_mint_addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=40_000_000,
)

Expand Down Expand Up @@ -1662,7 +1662,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return addrs
Expand Down
4 changes: 2 additions & 2 deletions cardano_node_tests/tests/test_node_upgrade.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def payment_addr_locked(
clusterlib_utils.fund_from_faucet(
addr,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return addr
Expand All @@ -71,7 +71,7 @@ def payment_addrs_disposable(
clusterlib_utils.fund_from_faucet(
addrs[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)

return addrs
Expand Down
26 changes: 13 additions & 13 deletions cardano_node_tests/tests/test_pools.py
Original file line number Diff line number Diff line change
Expand Up @@ -667,7 +667,7 @@ def test_stake_pool_metadata(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -748,7 +748,7 @@ def test_stake_pool_not_avail_metadata(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -818,7 +818,7 @@ def test_create_stake_pool(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -883,7 +883,7 @@ def test_deregister_stake_pool(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -1024,7 +1024,7 @@ def test_reregister_stake_pool(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=1_500_000_000,
)

Expand Down Expand Up @@ -1185,7 +1185,7 @@ def test_cancel_stake_pool_deregistration(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=1_500_000_000,
)

Expand Down Expand Up @@ -1350,7 +1350,7 @@ def test_update_stake_pool_metadata(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000 * no_of_addr,
)

Expand Down Expand Up @@ -1469,7 +1469,7 @@ def test_update_stake_pool_parameters(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000 * no_of_addr,
)

Expand Down Expand Up @@ -1570,7 +1570,7 @@ def test_sign_in_multiple_stages(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -1707,7 +1707,7 @@ def test_pool_registration_deregistration(
clusterlib_utils.fund_from_faucet(
pool_owner.payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -1813,7 +1813,7 @@ def pool_owners_pbt(
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -1896,7 +1896,7 @@ def _subtest(pool_cost: int) -> None:
clusterlib_utils.fund_from_faucet(
pool_owners[0].payment,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=900_000_000,
)

Expand Down Expand Up @@ -1940,7 +1940,7 @@ def pool_users(
clusterlib_utils.fund_from_faucet(
created_users[0],
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
amount=600_000_000,
)

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_reconnect.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
*addrs,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)
return addrs

Expand Down
2 changes: 1 addition & 1 deletion cardano_node_tests/tests/test_rollback.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def payment_addrs(
clusterlib_utils.fund_from_faucet(
*addrs,
cluster_obj=cluster,
faucet_data=cluster_manager.cache.addrs_data["user1"],
all_faucets=cluster_manager.cache.addrs_data,
)
return addrs

Expand Down
Loading

0 comments on commit 17f7c69

Please sign in to comment.