Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: canary tests to use a fork #2739

Merged
merged 2 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions yarn-project/canary/scripts/docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,5 @@ services:
ETHEREUM_HOST: http://fork:8545
CHAIN_ID: 31337
PXE_URL: http://sandbox:8080
SEARCH_START_BLOCK: ${FORK_BLOCK_NUMBER:-0}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am unsure if this is also needed but it was used in docker-compose-e2e-sandbox.yml (which is used for e2e-canary-test), so I added it here too!

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can't hurt

command: ${TEST:-./src/uniswap_trade_on_l1_from_l2.test.ts}
5 changes: 3 additions & 2 deletions yarn-project/canary/scripts/run_tests
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ set -eu
export TEST=$1
export IMAGE=${2:-canary}
export COMPOSE_FILE=${3:-./scripts/docker-compose.yml}

if [ "$TEST" = "uniswap_trade_on_l1_from_l2.test.ts" ]; then
:
# if test name ends with uniswap_trade_on_l1_from_l2.test.ts, use the forked mainnet
if [[ "$TEST" == *"uniswap_trade_on_l1_from_l2.test.ts" ]]; then
export FORK_URL=https://mainnet.infura.io/v3/9928b52099854248b3a096be07a6b23c
export FORK_BLOCK_NUMBER=17514288
fi
Expand Down