Update instructions to run integration tests locally

This commit is contained in:
Prathamesh Musale 2022-05-20 18:35:16 +05:30
parent 8bfcce95ca
commit 8b8f644b2a
2 changed files with 34 additions and 4 deletions

View File

@ -98,6 +98,7 @@ jobs:
run: | run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
@ -115,6 +116,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \ --env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build up -d --build
- name: Test - name: Test
@ -165,6 +167,7 @@ jobs:
run: | run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
@ -182,6 +185,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \ --env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build up -d --build
- name: Test - name: Test
@ -232,6 +236,7 @@ jobs:
run: | run: |
echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh echo vulcanize_go_ethereum=$GITHUB_WORKSPACE/go-ethereum/ > ./config.sh
echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh echo vulcanize_ipld_eth_server=$GITHUB_WORKSPACE/ipld-eth-server/ >> ./config.sh
echo vulcanize_test_contract=$GITHUB_WORKSPACE/ipld-eth-server/test/contract >> ./config.sh
echo db_write=$DB_WRITE >> ./config.sh echo db_write=$DB_WRITE >> ./config.sh
echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh echo eth_forward_eth_calls=$ETH_FORWARD_ETH_CALLS >> ./config.sh
echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh echo eth_proxy_on_error=$ETH_PROXY_ON_ERROR >> ./config.sh
@ -251,6 +256,7 @@ jobs:
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/latest/docker-compose-db.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-go-ethereum.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \ -f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-ipld-eth-server.yml" \
-f "$GITHUB_WORKSPACE/stack-orchestrator/docker/local/docker-compose-contract.yml" \
--env-file "$GITHUB_WORKSPACE/config.sh" \ --env-file "$GITHUB_WORKSPACE/config.sh" \
up -d --build up -d --build
- name: Test - name: Test

View File

@ -27,7 +27,18 @@
- Run integration tests: - Run integration tests:
- Update (Replace existing content) config file [config.sh](https://github.com/vulcanize/stack-orchestrator/blob/main/config.sh) in stack-orchestrator repo: - 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 generated config file with:
```bash ```bash
#!/bin/bash #!/bin/bash
@ -37,13 +48,17 @@
# Path to ipld-eth-server repo. # Path to ipld-eth-server repo.
vulcanize_ipld_eth_server=~/ipld-eth-server/ vulcanize_ipld_eth_server=~/ipld-eth-server/
# Path to test contract.
vulcanize_test_contract=~/ipld-eth-server/test/contract
db_write=true db_write=true
eth_forward_eth_calls=false eth_forward_eth_calls=false
eth_proxy_on_error=false eth_proxy_on_error=false
eth_http_path="go-ethereum:8545" eth_http_path="go-ethereum:8545"
``` ```
- Run stack-orchestrator: - Run stack-orchestrator:
```bash ```bash
# In stack-orchestrator root directory. # In stack-orchestrator root directory.
cd helper-scripts cd helper-scripts
@ -53,17 +68,20 @@
-d ../docker/latest/docker-compose-db.yml \ -d ../docker/latest/docker-compose-db.yml \
-d ../docker/local/docker-compose-go-ethereum.yml \ -d ../docker/local/docker-compose-go-ethereum.yml \
-d ../docker/local/docker-compose-ipld-eth-server.yml \ -d ../docker/local/docker-compose-ipld-eth-server.yml \
-d ../docker/local/docker-compose-contract.yml \
-v remove \ -v remove \
-p ../config.sh -p ../config.sh
``` ```
- Run test: - Run test:
```bash ```bash
# In ipld-eth-server root directory. # In ipld-eth-server root directory.
./scripts/run_integration_test.sh ./scripts/run_integration_test.sh
``` ```
- Update `config.sh` file: - Update stack-orchestrator `config.sh` file:
```bash ```bash
#!/bin/bash #!/bin/bash
@ -73,6 +91,9 @@
# Path to ipld-eth-server repo. # Path to ipld-eth-server repo.
vulcanize_ipld_eth_server=~/ipld-eth-server/ vulcanize_ipld_eth_server=~/ipld-eth-server/
# Path to test contract.
vulcanize_test_contract=~/ipld-eth-server/test/contract
db_write=false db_write=false
eth_forward_eth_calls=true eth_forward_eth_calls=true
eth_proxy_on_error=false eth_proxy_on_error=false
@ -86,7 +107,7 @@
./scripts/run_integration_test_forward_eth_calls.sh ./scripts/run_integration_test_forward_eth_calls.sh
``` ```
- Update `config.sh` file: - Update stack-orchestrator `config.sh` file:
```bash ```bash
#!/bin/bash #!/bin/bash
@ -96,6 +117,9 @@
# Path to ipld-eth-server repo. # Path to ipld-eth-server repo.
vulcanize_ipld_eth_server=~/ipld-eth-server/ vulcanize_ipld_eth_server=~/ipld-eth-server/
# Path to test contract.
vulcanize_test_contract=~/ipld-eth-server/test/contract
db_write=true db_write=true
eth_forward_eth_calls=false eth_forward_eth_calls=false
eth_proxy_on_error=false eth_proxy_on_error=false