Skip to content

Commit

Permalink
update test-dependencies script
Browse files Browse the repository at this point in the history
add restart option
add pravega and mssql2019
  • Loading branch information
rofr committed Jun 30, 2020
1 parent 60d4b23 commit c68ca1b
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 5 deletions.
19 changes: 19 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
version: '3'
services:
pravega:
image: pravega/pravega:0.7.0
command: standalone
environment:
HOST_IP:
ports:
- "9090:9090"
- "12345:12345"
gateway:
restart: always
image: claudiofahey/pravega-grpc-gateway:0.7.0
depends_on:
- pravega
ports:
- "54672:80"
environment:
PRAVEGA_CONTROLLER:
28 changes: 23 additions & 5 deletions test-dependencies.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,11 +1,29 @@
# Start or stop eventstore and postgres docker containers required by tests
#!/bin/bash

if [ "$1" == "stop" ]; then

export HOST_IP=`ipconfig getifaddr en0`
export PRAVEGA_CONTROLLER=tcp://$HOST_IP:9090
mssql_image=mcr.microsoft.com/mssql/server:2019-GA-ubuntu-16.04


if [ "$1" != "start" -a "$1" != "stop" -a "$1" != "restart" ]; then
echo Start, stop or restart backends required for automated tests
echo Usage: test-dependencies.sh { start \| stop \| restart }
fi


if [ "$1" == "stop" -o "$1" == "restart" ]; then
docker rm -f eventstore
docker rm -f postgres
elif [ "$1" == "start" ]; then
docker rm -f mssql2019
docker-compose down
fi


if [ "$1" == "start" -o "$1" == "restart" ]; then
docker run --name eventstore -d -p 2113:2113 -p 1113:1113 eventstore/eventstore:release-4.1.0
docker run --name postgres -dp5432:5432 -e POSTGRES_PASSWORD='postgres' postgres:9.6.10
else
echo Syntax: . test-dependencies.sh start\|stop
docker run --name mssql2019 -e 'ACCEPT_EULA=Y' -e 'MSSQL_SA_PASSWORD=abc123ABC' -p 1433:1433 -d $mssql_image
docker-compose up -d
fi

0 comments on commit c68ca1b

Please sign in to comment.