From b0674df3ce9cef2dff2f0294c5998108b15262ac Mon Sep 17 00:00:00 2001 From: Arijit Das Date: Mon, 27 Sep 2021 17:53:42 +0530 Subject: [PATCH] Remove parallel migration in integration test. --- docker-compose.yml | 1 + entrypoint.sh | 21 ++++++++++++--------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index 2ef02cfd..0137fba2 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -62,6 +62,7 @@ services: DATABASE_USER: "vdbm" DATABASE_PASSWORD: "password" ETH_CHAIN_ID: 4 + RUN_DB_MIGRATION: "no" volumes: - type: bind source: ./chain.json diff --git a/entrypoint.sh b/entrypoint.sh index 2c9e9821..0efef13f 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -4,18 +4,21 @@ # Construct the connection string for postgres VDB_PG_CONNECT=postgresql://$DATABASE_USER:$DATABASE_PASSWORD@$DATABASE_HOSTNAME:$DATABASE_PORT/$DATABASE_NAME?sslmode=disable -# Run the DB migrations -echo "Connecting with: $VDB_PG_CONNECT" -echo "Running database migrations" -./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up -rv=$? -if [ $rv != 0 ]; then - echo "Could not run migrations. Are the database details correct?" - exit 1 +if [ "$RUN_DB_MIGRATION" != "no" ] +then + # Run the DB migrations + echo "Connecting with: $VDB_PG_CONNECT" + echo "Running database migrations" + ./goose -dir migrations/vulcanizedb postgres "$VDB_PG_CONNECT" up + rv=$? + + if [ $rv != 0 ]; then + echo "Could not run migrations. Are the database details correct?" + exit 1 + fi fi - echo "Beginning the ipld-eth-server process" echo running: ./ipld-eth-server ${VDB_COMMAND} --config=config.toml