andywood873 / integration-tests

[Optimism] Service Integration Tests

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Integration Tests

Typescript based integration test repo for Optimistic Ethereum.

Test suites are defined as a package in the packages directory. This repo can be ran on its own or as part of Optimism Integration.

Running with Optimism Integration

The Optimism Integration repo can be used to automatically configure and run the test suites found in this repo. See the README for usage information.

It is assumed that each test suite gets a fresh state when running this way. This means that the packages must not depend on each other.

Docker images found on Dockerhub are used when running the test suites this way.

Running locally

This repo can be ran locally against existing services but the configuration must be handled by the user. A .env file will be used to populate the configuration when then environment variable NODE_ENV is set to local.

There should be a yarn script for each package found in packages.

$ yarn test:x-domain
$ yarn test:tx-ingestion
$ yarn test:sequencer-interactions

The environment variables that are used by this repository can be found in the Config class in common.ts.

Environment Variable Description
L1_NODE_WEB3_URL L1 HTTP endpoint
L2_NODE_WEB3_URL L2 HTTP endpoint
MNEMONIC Mnemonic used to derive keys
ETH1_ADDRESS_RESOLVER_ADDRESS Address Resolver Address
SEQUENCER_PRIVATE_KEY Private key used by sequencer
DEPLOYER_PRIVATE_KEY Private key used by deployer
TARGET_GAS_LIMIT L2 gas limit
CHAIN_ID L2 Chain ID

The test suites must not run in parallel.

About

[Optimism] Service Integration Tests

License:MIT License


Languages

Language:TypeScript 60.4%Language:Solidity 38.3%Language:JavaScript 0.7%Language:Shell 0.6%