From c90db4773c24243a95ce8be7978d4f4f32ee0ff9 Mon Sep 17 00:00:00 2001 From: Renan DelValle Date: Mon, 29 Apr 2019 17:20:25 -0700 Subject: [PATCH] Adding set up and tear down to run tests script and renanming script to runTests since it's applicable to linux and mac. --- runTestsMac.sh => runTests.sh | 9 +++++++++ 1 file changed, 9 insertions(+) rename runTestsMac.sh => runTests.sh (70%) diff --git a/runTestsMac.sh b/runTests.sh similarity index 70% rename from runTestsMac.sh rename to runTests.sh index 4c695de..42f07ba 100755 --- a/runTestsMac.sh +++ b/runTests.sh @@ -1,4 +1,13 @@ #!/bin/bash +docker-compose up -d + +# If running docker-compose up gives any error, don't do anything. +if [ $? -ne 0 ]; then + exit +fi + # Since we run our docker compose setup in bridge mode to be able to run on MacOS, we have to launch a Docker container within the bridge network in order to avoid any routing issues. docker run -t -v $(pwd):/go/src/github.com/paypal/gorealis --network gorealis_aurora_cluster golang:1.10-stretch go test -v github.com/paypal/gorealis $@ + +docker-compose down