From fdff0bee4ed4d65a164f67ed6587238179cbeccb Mon Sep 17 00:00:00 2001 From: Joseph Schorr Date: Thu, 1 Dec 2016 15:15:54 -0500 Subject: [PATCH] Add configurable Docker host in full db tests --- test/fulldbtest.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/fulldbtest.sh b/test/fulldbtest.sh index af7076365..a3de55009 100755 --- a/test/fulldbtest.sh +++ b/test/fulldbtest.sh @@ -42,6 +42,9 @@ run_tests() { SKIP_DB_SCHEMA=true TEST_DATABASE_URI=$1 TEST=true python -m unittest discover -f } +CIP=${CONTAINERIP-'127.0.0.1'} +echo "> Using container IP address $CIP" + # NOTE: MySQL is currently broken on setup. # Test (and generate, if requested) via MySQL. echo '> Starting MySQL' @@ -49,7 +52,7 @@ up_mysql echo '> Running Full Test Suite (mysql)' set +e -run_tests "mysql+pymysql://root:password@192.168.99.100/genschema" +run_tests "mysql+pymysql://root:password@$CIP/genschema" set -e down_mysql @@ -59,6 +62,6 @@ up_postgres echo '> Running Full Test Suite (postgres)' set +e -run_tests "postgresql://postgres@192.168.99.100/genschema" +run_tests "postgresql://postgres@$CIP/genschema" set -e down_postgres