Skip to content

Commit

Permalink
Document details for running fork test
Browse files Browse the repository at this point in the history
  • Loading branch information
ermyas committed Feb 7, 2024
1 parent 833ef70 commit 0adf2b3
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,28 @@ $ forge install
$ forge build
```

### Test
### Testing
To run all tests (unit, integration, and fork tests), run the following command:
```shell
$ forge test
```
This requires setting the relevant environment variables as described in the "Fork Test" section below.

**Unit and Integration Tests Only**
```shell
$ forge test --no-match-path "test/fork/**"
```

**Fork Tests Only**

The fork tests run a suite of tests against one or more deployments of the bridge.
To run these tests copy [`.env.example`](.env.example) file to a `.env` file and set the `MAINNET_RPC_URL` and `TESTNET_RPC_URL` environment variables. Set or update any other environment variables as required.
Then run the following command to run the fork tests.

```shell
$ forge test --match-path "test/fork/**"
```

## Contract Deployment
### Local Deployment
To set up the contracts on two separate local networks, we need to start running the local networks, then deploy and initialize the contracts.
Expand Down

0 comments on commit 0adf2b3

Please sign in to comment.