From edde79e06156c13be9a3bb53b760ea08085213f9 Mon Sep 17 00:00:00 2001 From: Denis Makogon Date: Fri, 21 Jul 2017 19:56:26 +0300 Subject: [PATCH] Trying to figure out networking problems --- .gitlab-ci.yml | 7 +++---- api_test.sh | 5 +++++ 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index aa26c6537..9ce8396f8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -67,10 +67,9 @@ integration_tests: script: - go build -o functions-alpine - docker build -t funcy/functions:latest . -# - make docker-test-run-with-bolt - - DOCKER_LOCATION=container_ip make docker-test-run-with-sqlite3 -# - make docker-test-run-with-postgres -# - make docker-test-run-with-redis +# - DOCKER_LOCATION=container_ip make docker-test-run-with-sqlite3 +# - DOCKER_LOCATION=container_ip make docker-test-run-with-postgres + - DOCKER_LOCATION=container_ip make docker-test-run-with-mysql deploy_job: only: diff --git a/api_test.sh b/api_test.sh index 454515c24..fb02913ad 100755 --- a/api_test.sh +++ b/api_test.sh @@ -7,6 +7,7 @@ case "$1" in docker run --name func-server --privileged -v /var/run/docker.sock:/var/run/docker.sock -d -e NO_PROXY -e HTTP_PROXY -e DOCKER_HOST=${DOCKER_HOST} -e LOG_LEVEL=debug -p 8080:8080 funcy/functions sleep 1 docker logs func-server + docker inspect -f '{{.NetworkSettings.IPAddress}}' func-server ;; "mysql" ) @@ -19,6 +20,8 @@ case "$1" in export MYSQL_PORT=3306 docker run --name func-server --privileged -d -e NO_PROXY -e HTTP_PROXY -e DOCKER_HOST=${DOCKER_HOST} -e LOG_LEVEL=debug -e "DB_URL=mysql://root:root@tcp(${MYSQL_HOST}:${MYSQL_PORT})/funcs" -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock funcy/functions docker logs func-server + docker inspect -f '{{.NetworkSettings.IPAddress}}' func-mysql-test + docker inspect -f '{{.NetworkSettings.IPAddress}}' func-server ;; @@ -32,6 +35,8 @@ case "$1" in export POSTGRES_PORT=5432 docker run --name func-server --privileged -d -e NO_PROXY -e HTTP_PROXY -e DOCKER_HOST=${DOCKER_HOST} -e LOG_LEVEL=debug -e "DB_URL=postgres://postgres:root@${POSTGRES_HOST}:${POSTGRES_PORT}/funcs?sslmode=disable" -p 8080:8080 -v /var/run/docker.sock:/var/run/docker.sock funcy/functions docker logs func-server + docker inspect -f '{{.NetworkSettings.IPAddress}}' func-postgres-test + docker inspect -f '{{.NetworkSettings.IPAddress}}' func-server ;; esac