2022-05-23 14:13:09 +00:00
|
|
|
# Test Instructions
|
2022-05-20 11:17:02 +00:00
|
|
|
|
|
|
|
## Setup
|
|
|
|
|
|
|
|
- For running integration tests:
|
|
|
|
|
2022-07-13 07:42:59 +00:00
|
|
|
- Clone [stack-orchestrator](https://github.com/vulcanize/stack-orchestrator), [go-ethereum](https://github.com/vulcanize/go-ethereum) and [ipld-eth-db](https://github.com/vulcanize/ipld-eth-db) repositories.
|
2022-05-20 11:17:02 +00:00
|
|
|
|
2022-08-23 07:35:50 +00:00
|
|
|
- Checkout [v4 release](https://github.com/vulcanize/ipld-eth-db/releases/tag/v4.2.1-alpha) in ipld-eth-db repo.
|
2022-07-13 07:42:59 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# In ipld-eth-db repo.
|
2022-08-23 07:35:50 +00:00
|
|
|
git checkout v4.2.1-alpha
|
2022-07-13 07:42:59 +00:00
|
|
|
```
|
|
|
|
|
2022-08-23 07:35:50 +00:00
|
|
|
- Checkout [v4 release](https://github.com/vulcanize/go-ethereum/releases/tag/v1.10.21-statediff-4.1.2-alpha) in go-ethereum repo.
|
2022-05-20 11:17:02 +00:00
|
|
|
|
|
|
|
```bash
|
|
|
|
# In go-ethereum repo.
|
2022-08-23 07:35:50 +00:00
|
|
|
git checkout v1.10.21-statediff-4.1.2-alpha
|
2022-05-20 11:17:02 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
- Checkout working commit in stack-orchestrator repo.
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# In stack-orchestrator repo.
|
2022-07-13 07:42:59 +00:00
|
|
|
git checkout f2fd766f5400fcb9eb47b50675d2e3b1f2753702
|
2022-05-20 11:17:02 +00:00
|
|
|
```
|
|
|
|
|
|
|
|
## Run
|
|
|
|
|
|
|
|
- Run unit tests:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# In ipld-eth-db-validator root directory.
|
|
|
|
./scripts/run_unit_test.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
- Run integration tests:
|
|
|
|
|
|
|
|
- In stack-orchestrator repo:
|
|
|
|
|
|
|
|
- Create config file:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
cd helper-scripts
|
|
|
|
|
|
|
|
./create-config.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
A `config.sh` will be created in the root directory.
|
|
|
|
|
|
|
|
- Update/Edit the config file `config.sh`:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-13 07:42:59 +00:00
|
|
|
# Path to ipld-eth-server repo.
|
|
|
|
vulcanize_ipld_eth_db=~/ipld-eth-db/
|
|
|
|
|
2022-05-20 11:17:02 +00:00
|
|
|
# Path to go-ethereum repo.
|
|
|
|
vulcanize_go_ethereum=~/go-ethereum
|
|
|
|
|
|
|
|
# Path to contract folder.
|
|
|
|
vulcanize_test_contract=~/ipld-eth-db-validator/test/contract
|
|
|
|
|
2022-07-13 07:42:59 +00:00
|
|
|
genesis_file_path='start-up-files/go-ethereum/genesis.json'
|
2022-05-20 11:17:02 +00:00
|
|
|
db_write=true
|
|
|
|
```
|
|
|
|
|
|
|
|
- Run stack-orchestrator:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# In stack-orchestrator root directory.
|
|
|
|
cd helper-scripts
|
|
|
|
|
|
|
|
./wrapper.sh \
|
|
|
|
-e docker \
|
2022-07-13 07:42:59 +00:00
|
|
|
-d ../docker/local/docker-compose-db-sharding.yml \
|
2022-05-20 11:17:02 +00:00
|
|
|
-d ../docker/local/docker-compose-go-ethereum.yml \
|
|
|
|
-d ../docker/local/docker-compose-contract.yml \
|
|
|
|
-v remove \
|
|
|
|
-p ../config.sh
|
|
|
|
```
|
|
|
|
|
|
|
|
- Run tests:
|
|
|
|
|
|
|
|
```bash
|
|
|
|
# In ipld-eth-db-validator root directory.
|
|
|
|
./scripts/run_integration_test.sh
|
|
|
|
```
|