diff options
author | John Jannotti <jannotti@gmail.com> | 2023-12-08 17:43:23 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-08 17:43:23 -0500 |
commit | 4b872f2324c6b27dbabd4017bf1b9f4088bdfdf6 (patch) | |
tree | 2457fde825d9f35be574f85cb531615202f82415 | |
parent | b28b145c5fe5a5f97f5b5e327f0f8ee49f551c81 (diff) |
Chore: Update testing to use current python SDK. (#5861)
-rwxr-xr-x | test/scripts/e2e.sh | 7 | ||||
-rwxr-xr-x | test/scripts/e2e_client_runner.py | 5 | ||||
-rwxr-xr-x | test/scripts/e2e_subs/example.py | 2 | ||||
-rwxr-xr-x | test/scripts/e2e_subs/goal/goal.py | 2 | ||||
-rwxr-xr-x | test/scripts/e2e_subs/min_balance.py | 2 | ||||
-rwxr-xr-x | test/scripts/e2e_subs/shared-resources.py | 2 |
6 files changed, 10 insertions, 10 deletions
diff --git a/test/scripts/e2e.sh b/test/scripts/e2e.sh index 760c3170a..a3b2c756f 100755 --- a/test/scripts/e2e.sh +++ b/test/scripts/e2e.sh @@ -125,9 +125,10 @@ if [ -z "$E2E_TEST_FILTER" ] || [ "$E2E_TEST_FILTER" == "SCRIPTS" ]; then . "${TEMPDIR}/ve/bin/activate" "${TEMPDIR}/ve/bin/pip3" install --upgrade pip - # Pin a version of our python SDK's so that breaking changes don't spuriously break our tests. - # Please update as necessary. - "${TEMPDIR}/ve/bin/pip3" install py-algorand-sdk==1.17.0 + # Pin major version of our python SDK's so that breaking changes + # don't spuriously break our tests. If a minor version breaks our + # tests, we ought to find out. + "${TEMPDIR}/ve/bin/pip3" install 'py-algorand-sdk==2.*' # Enable remote debugging: "${TEMPDIR}/ve/bin/pip3" install --upgrade debugpy diff --git a/test/scripts/e2e_client_runner.py b/test/scripts/e2e_client_runner.py index 7b425ef92..3d5888696 100755 --- a/test/scripts/e2e_client_runner.py +++ b/test/scripts/e2e_client_runner.py @@ -114,11 +114,12 @@ def _script_thread_inner(runset, scriptname, timeout): params = algod.suggested_params() round = params.first max_init_wait_rounds = 5 - txn = algosdk.transaction.PaymentTxn(sender=maxpubaddr, fee=params.min_fee, first=round, last=round+max_init_wait_rounds, gh=params.gh, receiver=addr, amt=1000000000000, flat_fee=True) + params.last = params.first + max_init_wait_rounds + txn = algosdk.transaction.PaymentTxn(maxpubaddr, params, addr, 1_000_000_000_000) stxn = kmd.sign_transaction(pubw, '', txn) txid = algod.send_transaction(stxn) ptxinfo = None - for i in range(max_init_wait_rounds): + for _ in range(max_init_wait_rounds): txinfo = algod.pending_transaction_info(txid) if txinfo.get('round'): break diff --git a/test/scripts/e2e_subs/example.py b/test/scripts/e2e_subs/example.py index 4852ac9d7..9e4e97097 100755 --- a/test/scripts/e2e_subs/example.py +++ b/test/scripts/e2e_subs/example.py @@ -4,7 +4,7 @@ import os import sys from goal import Goal -import algosdk.future.transaction as txn +import algosdk.transaction as txn from datetime import datetime stamp = datetime.now().strftime("%Y%m%d_%H%M%S") diff --git a/test/scripts/e2e_subs/goal/goal.py b/test/scripts/e2e_subs/goal/goal.py index d36241fd7..812afe897 100755 --- a/test/scripts/e2e_subs/goal/goal.py +++ b/test/scripts/e2e_subs/goal/goal.py @@ -6,7 +6,7 @@ import os import subprocess import algosdk -import algosdk.future.transaction as txn +import algosdk.transaction as txn import algosdk.encoding as enc diff --git a/test/scripts/e2e_subs/min_balance.py b/test/scripts/e2e_subs/min_balance.py index b7376fd37..dfeacbe3b 100755 --- a/test/scripts/e2e_subs/min_balance.py +++ b/test/scripts/e2e_subs/min_balance.py @@ -5,8 +5,6 @@ from datetime import datetime from pathlib import PurePath import sys -import algosdk.future.transaction as txn - from goal import Goal # Set INTERACTIVE True if you want to run a remote debugger interactively on the given PORT diff --git a/test/scripts/e2e_subs/shared-resources.py b/test/scripts/e2e_subs/shared-resources.py index b5a93f96c..2df56f789 100755 --- a/test/scripts/e2e_subs/shared-resources.py +++ b/test/scripts/e2e_subs/shared-resources.py @@ -3,7 +3,7 @@ import os import sys import algosdk.encoding as enc -import algosdk.future.transaction as txn +import algosdk.transaction as txn from goal import Goal from datetime import datetime |