forked from ethereum/go-ethereum
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Run tests using multi-node database setup
- Loading branch information
1 parent
d2c25c6
commit 8a4583c
Showing
4 changed files
with
42 additions
and
23 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,28 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Build database image | ||
docker build -t migrations-test https://github.com/vulcanize/ipld-eth-db.git#sharding | ||
|
||
mkdir -p out | ||
|
||
# Remove existing docker-multi-node directory | ||
rm -rf out/docker-multi-node/ | ||
|
||
# Copy over files to setup multi-node database | ||
ID=$(docker create migrations-test) | ||
docker cp $ID:/app/docker-multi-node out/docker-multi-node/ | ||
docker rm -v $ID | ||
|
||
# Spin up multi-node database | ||
docker-compose -f out/docker-multi-node/docker-compose.test.yml -f docker-compose.yml up ipld-eth-db | ||
sleep 20 | ||
|
||
# Run unit tests | ||
go clean -testcache | ||
make statedifftest | ||
|
||
# Clean up | ||
docker-compose -f out/docker-multi-node/docker-compose.test.yml -f docker-compose.yml down --remove-orphans --volumes | ||
rm -rf out/docker-multi-node/ |
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