From 45de492b4c9038a3c3fd0c0e78875eb79f1a1425 Mon Sep 17 00:00:00 2001 From: i-norden Date: Wed, 29 Dec 2021 15:01:57 -0600 Subject: [PATCH] script for integration tests with eth_call direct proxy forwarding --- scripts/run_integration_test.sh | 5 +++- .../run_integration_test_forward_eth_calls.sh | 24 +++++++++++++++++++ 2 files changed, 28 insertions(+), 1 deletion(-) create mode 100644 scripts/run_integration_test_forward_eth_calls.sh diff --git a/scripts/run_integration_test.sh b/scripts/run_integration_test.sh index 211df86e..e34efb6f 100755 --- a/scripts/run_integration_test.sh +++ b/scripts/run_integration_test.sh @@ -1,6 +1,9 @@ set -e set -o xtrace +export ETH_FORWARD_ETH_CALLS=false +export DB_WRITE=true + # Clear up existing docker images and volume. docker-compose down --remove-orphans --volumes @@ -18,4 +21,4 @@ export DATABASE_HOSTNAME=127.0.0.1 # Wait for containers to be up and execute the integration test. while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ - make integrationtest \ No newline at end of file + make integrationtest diff --git a/scripts/run_integration_test_forward_eth_calls.sh b/scripts/run_integration_test_forward_eth_calls.sh new file mode 100644 index 00000000..763eda41 --- /dev/null +++ b/scripts/run_integration_test_forward_eth_calls.sh @@ -0,0 +1,24 @@ +set -e +set -o xtrace + +export ETH_FORWARD_ETH_CALLS=true +export DB_WRITE=false + +# Clear up existing docker images and volume. +docker-compose down --remove-orphans --volumes + +# Build and start the containers. +# Note: Build only if `ipld-eth-server` or other container code is modified. Otherwise comment this line. +docker-compose -f docker-compose.test.yml -f docker-compose.yml build eth-server +docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d ipld-eth-db dapptools contract eth-server + +export PGPASSWORD=password +export DATABASE_USER=vdbm +export DATABASE_PORT=8077 +export DATABASE_PASSWORD=password +export DATABASE_HOSTNAME=127.0.0.1 + +# Wait for containers to be up and execute the integration test. +while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ + while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ + make integrationtest