From b4a102d6779548a4ff5ac1a7d7dce6bc487c26ac Mon Sep 17 00:00:00 2001 From: maskpp Date: Fri, 12 Jan 2024 15:35:25 +0800 Subject: [PATCH] feat(docs): add `README` for debugging tests (#498) Co-authored-by: David Co-authored-by: Roger <50648015+RogerLamTd@users.noreply.github.com> --- integration_test/README.md | 23 +++++++++++++++++++++++ integration_test/test_env.sh | 22 ++++++++++++++++++++++ 2 files changed, 45 insertions(+) create mode 100644 integration_test/README.md diff --git a/integration_test/README.md b/integration_test/README.md new file mode 100644 index 000000000..c2e4d3ff6 --- /dev/null +++ b/integration_test/README.md @@ -0,0 +1,23 @@ +# How to debug test cases? +* start docker compose +``` +./docker/start.sh +``` + +* deploy L1 contracts +``` +# replace $taiko-mono with the taiko-mono repo path. +TAIKO_MONO_DIR=$taiko-mono ./integration_test/deploy_l1_contract.sh +``` + +* show environment variables +``` +# replace $taiko-mono with the taiko-mono repo path. +TAIKO_MONO_DIR=$taiko-mono ./integration_test/test_env.sh +``` + +* copy the result of previous step and paste it into `Debug configurations` +> after debugging, don't forget stop docker compose! +``` +./docker/stop.sh +``` \ No newline at end of file diff --git a/integration_test/test_env.sh b/integration_test/test_env.sh index 8ff64aa61..ec3e2ad1f 100755 --- a/integration_test/test_env.sh +++ b/integration_test/test_env.sh @@ -21,3 +21,25 @@ export L1_SECURITY_COUNCIL_PRIVATE_KEY=0xdbda1821b80551c9d65939329250298aa3472ba export L1_PROPOSER_PRIVATE_KEY=0xac0974bec39a17e36ba4a6b4d238ff944bacb478cbed5efcae784d7bf4f2ff80 export L1_PROVER_PRIVATE_KEY=0x59c6995e998f97a5a0044966f0945389dc9e86dae88c7a8412f4603b6b78690d export TREASURY=0x1670010000000000000000000000000000010001 + +# show the integration test environment variables. +echo "TAIKO_MONO_DIR=$TAIKO_MONO_DIR" +echo "L1_NODE_HTTP_ENDPOINT=$L1_NODE_HTTP_ENDPOINT" +echo "L1_NODE_WS_ENDPOINT=$L1_NODE_WS_ENDPOINT" +echo "L2_EXECUTION_ENGINE_HTTP_ENDPOINT=$L2_EXECUTION_ENGINE_HTTP_ENDPOINT" +echo "L2_EXECUTION_ENGINE_WS_ENDPOINT=$L2_EXECUTION_ENGINE_WS_ENDPOINT" +echo "L2_EXECUTION_ENGINE_AUTH_ENDPOINT=$L2_EXECUTION_ENGINE_AUTH_ENDPOINT" +echo "TAIKO_L1_ADDRESS=$TAIKO_L1_ADDRESS" +echo "TAIKO_L2_ADDRESS=$TAIKO_L2_ADDRESS" +echo "TAIKO_TOKEN_ADDRESS=$TAIKO_TOKEN_ADDRESS" +echo "ASSIGNMENT_HOOK_ADDRESS=$ASSIGNMENT_HOOK_ADDRESS" +echo "TIMELOCK_CONTROLLER=$TIMELOCK_CONTROLLER" +echo "ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS=$ROLLUP_ADDRESS_MANAGER_CONTRACT_ADDRESS" +echo "GUARDIAN_PROVER_CONTRACT_ADDRESS=$GUARDIAN_PROVER_CONTRACT_ADDRESS" +echo "L1_SIGNAL_SERVICE_CONTRACT_ADDRESS=$L1_SIGNAL_SERVICE_CONTRACT_ADDRESS" +echo "L1_CONTRACT_OWNER_PRIVATE_KEY=$L1_CONTRACT_OWNER_PRIVATE_KEY" +echo "L1_SECURITY_COUNCIL_PRIVATE_KEY=$L1_SECURITY_COUNCIL_PRIVATE_KEY" +echo "L1_PROPOSER_PRIVATE_KEY=$L1_PROPOSER_PRIVATE_KEY" +echo "L1_PROVER_PRIVATE_KEY=$L1_PROVER_PRIVATE_KEY" +echo "TREASURY=$TREASURY" +echo "JWT_SECRET=$JWT_SECRET"