Skip to content

Files

Latest commit

491c90d · Apr 5, 2023

History

History
This branch is 12010 commits behind ethereum-optimism/optimism:develop.

integration-tests

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
Dec 16, 2022
Jan 4, 2022
May 4, 2022
Jan 5, 2023
Jan 10, 2022
May 2, 2022
Jun 29, 2021
Nov 10, 2021
Jan 12, 2022
Dec 8, 2022
May 13, 2021
Oct 26, 2022
Feb 14, 2023
Apr 5, 2023
Jan 4, 2022

@eth-optimism/integration-tests

Note that these tests are ran against the legacy system, see op-e2e for the bedrock test suite.

Setup

Follow installation + build instructions in the primary README. Then, run:

yarn build

Running integration tests

Testing a live network

Testing on a live network is a bit more complicated than testing locally. You'll need the following in order to do so:

  1. A pre-funded wallet with at least 40 ETH.
  2. URLs to an L1 and L2 node.
  3. The address of the address manager contract.
  4. The chain ID of the L2.

Once you have all the necessary info, create a .env file like the one in .env.example and fill it in with the values above. Then, run:

yarn test:integration:live

This will take quite a long time. Kovan, for example, takes about 30 minutes to complete.

You can also set environment variables on the command line instead of inside .env if you want:

L1_URL=whatever L2_URL=whatever yarn test:integration:live

To run the Uniswap integration tests against a deployed set of Uniswap contracts, add the following env vars:

UNISWAP_POSITION_MANAGER_ADDRESS=<non fungible position manager address>
UNISWAP_ROUTER_ADDRESS=<router address>

Running actor tests

Actor tests use the same environment variables as the integration tests, so set up your .env file if you haven't already. Then, run yarn test:actor <args> to run the tests. Note that it will be very expensive to run the actor tests against mainnet, and that the tests can take a while to complete.

See actor-tests/README.md for information on actor tests.