From 9ff48a3f9391706b94b47483adad981cc1a794f6 Mon Sep 17 00:00:00 2001 From: adisaran64 Date: Wed, 16 Nov 2022 11:33:13 -0800 Subject: [PATCH 1/5] changing git config and adding tests --- scripts/start-geth.sh | 2 +- tests/integration_tests/test_setup.py | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) create mode 100644 tests/integration_tests/test_setup.py diff --git a/scripts/start-geth.sh b/scripts/start-geth.sh index 1d6eed606d..0cbe455e4a 100755 --- a/scripts/start-geth.sh +++ b/scripts/start-geth.sh @@ -52,7 +52,7 @@ rm $tmpfile # start up geth --networkid 9000 --datadir $DATA --http --http.addr localhost --http.api 'personal,eth,net,web3,txpool,miner' \ -unlock '0x57f96e6b86cdefdb3d412547816a82e3e0ebf9d2' --password $pwdfile \ ---mine --allow-insecure-unlock \ +--mine --miner.threads 1 --allow-insecure-unlock --ipcdisable \ $@ rm $pwdfile diff --git a/tests/integration_tests/test_setup.py b/tests/integration_tests/test_setup.py new file mode 100644 index 0000000000..5066360111 --- /dev/null +++ b/tests/integration_tests/test_setup.py @@ -0,0 +1,23 @@ +from .utils import ( + ADDRS, + CONTRACTS, + KEYS, + deploy_contract, + send_transaction, + send_successful_transaction, + w3_wait_for_block, + w3_wait_for_new_blocks, +) + +def test_setup_geth(geth): + w3 = geth.w3 + w3_wait_for_block(w3, 5) + + # test utilities + send_successful_transaction(w3) + print("successfully sent transaction") + deploy_contract(w3, CONTRACTS["TestERC20A"]) + print("successfully deployed contract") + + # ensure blocks are still being produced + w3_wait_for_new_blocks(w3, 5) \ No newline at end of file From 94b5d3c2986c1433597979d100f876568382671f Mon Sep 17 00:00:00 2001 From: adisaran64 Date: Wed, 16 Nov 2022 11:36:25 -0800 Subject: [PATCH 2/5] removing print statements --- tests/integration_tests/test_setup.py | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/integration_tests/test_setup.py b/tests/integration_tests/test_setup.py index 5066360111..07017496af 100644 --- a/tests/integration_tests/test_setup.py +++ b/tests/integration_tests/test_setup.py @@ -15,9 +15,7 @@ def test_setup_geth(geth): # test utilities send_successful_transaction(w3) - print("successfully sent transaction") deploy_contract(w3, CONTRACTS["TestERC20A"]) - print("successfully deployed contract") # ensure blocks are still being produced w3_wait_for_new_blocks(w3, 5) \ No newline at end of file From ab00bb763a7f4c89dcb56c938d6ede3120c545fb Mon Sep 17 00:00:00 2001 From: adisaran64 Date: Wed, 16 Nov 2022 11:47:41 -0800 Subject: [PATCH 3/5] remove unneccessary imports --- tests/integration_tests/test_setup.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/integration_tests/test_setup.py b/tests/integration_tests/test_setup.py index 07017496af..69b7e8f375 100644 --- a/tests/integration_tests/test_setup.py +++ b/tests/integration_tests/test_setup.py @@ -1,9 +1,6 @@ from .utils import ( - ADDRS, CONTRACTS, - KEYS, deploy_contract, - send_transaction, send_successful_transaction, w3_wait_for_block, w3_wait_for_new_blocks, From 4c801dfc106b6880c9a24a4f6cadc7ccd0180f40 Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Wed, 16 Nov 2022 19:13:22 -0500 Subject: [PATCH 4/5] fix flake --- tests/integration_tests/test_setup.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/integration_tests/test_setup.py b/tests/integration_tests/test_setup.py index 69b7e8f375..57d6fb96ce 100644 --- a/tests/integration_tests/test_setup.py +++ b/tests/integration_tests/test_setup.py @@ -6,6 +6,7 @@ w3_wait_for_new_blocks, ) + def test_setup_geth(geth): w3 = geth.w3 w3_wait_for_block(w3, 5) @@ -15,4 +16,4 @@ def test_setup_geth(geth): deploy_contract(w3, CONTRACTS["TestERC20A"]) # ensure blocks are still being produced - w3_wait_for_new_blocks(w3, 5) \ No newline at end of file + w3_wait_for_new_blocks(w3, 5) From 140cf83b03e67f9694681d2fe2b33e4387730abf Mon Sep 17 00:00:00 2001 From: Freddy Caceres Date: Wed, 16 Nov 2022 19:14:52 -0500 Subject: [PATCH 5/5] remove geth setup test --- tests/integration_tests/test_setup.py | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 tests/integration_tests/test_setup.py diff --git a/tests/integration_tests/test_setup.py b/tests/integration_tests/test_setup.py deleted file mode 100644 index 57d6fb96ce..0000000000 --- a/tests/integration_tests/test_setup.py +++ /dev/null @@ -1,19 +0,0 @@ -from .utils import ( - CONTRACTS, - deploy_contract, - send_successful_transaction, - w3_wait_for_block, - w3_wait_for_new_blocks, -) - - -def test_setup_geth(geth): - w3 = geth.w3 - w3_wait_for_block(w3, 5) - - # test utilities - send_successful_transaction(w3) - deploy_contract(w3, CONTRACTS["TestERC20A"]) - - # ensure blocks are still being produced - w3_wait_for_new_blocks(w3, 5)