-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
36 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
set -e | ||
set -o xtrace | ||
|
||
# Clear up existing docker images and volume. | ||
docker-compose down --remove-orphans --volumes | ||
|
||
# Build and start the containers. | ||
# Note: Build only if `ipld-eth-server` code is modified. Otherwise comment this line. | ||
docker build -t ipld-eth-server_eth-server:latest . | ||
docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d db dapptools contract eth-server | ||
|
||
export PGPASSWORD=password | ||
export DATABASE_USER=vdbm | ||
export DATABASE_PORT=8077 | ||
export DATABASE_PASSWORD=password | ||
export DATABASE_HOSTNAME=127.0.0.1 | ||
|
||
# Wait for containers to be up and execute the integration test. | ||
while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8081)" != "200" ]; do echo "waiting for ipld-eth-server..." && sleep 5; done && \ | ||
while [ "$(curl -s -o /dev/null -w ''%{http_code}'' localhost:8545)" != "200" ]; do echo "waiting for geth-statediff..." && sleep 5; done && \ | ||
make integrationtest |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d db | ||
PGPASSWORD=password DATABASE_USER=vdbm DATABASE_PORT=8077 DATABASE_PASSWORD=password DATABASE_HOSTNAME=127.0.0.1 make test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,15 @@ | ||
|
||
Spin up services: | ||
``` | ||
docker-compose -f docker-compose.test.yml -f ../docker-compose.yml up contract | ||
docker-compose -f docker-compose.test.yml -f docker-compose.yml up -d db dapptools contract eth-server | ||
``` | ||
|
||
Running unit tests: | ||
```bash | ||
make test_local | ||
``` | ||
|
||
Running intrgration test: | ||
```bash | ||
make integrationtest_local | ||
``` |