Files
fn-serverless/helpers.sh
Tolga Ceylan dc6a3305eb fn: datastore dial retry should be configurable (#927)
* fn: datastore dial retry should be configurable

Setting this to high (60) in api and system tests.

* fn: netcat connect is not meaningful in wait for DB.
2018-04-09 10:47:00 -07:00

28 lines
657 B
Bash

#!/bin/bash
set -exo pipefail
function host {
case ${DOCKER_LOCATION:-localhost} in
localhost)
echo "localhost"
;;
docker_ip)
if [[ ! -z ${DOCKER_HOST} ]]
then
DOCKER_IP=`echo ${DOCKER_HOST} | awk -F/ '{print $3}'| awk -F: '{print $1}'`
fi
echo ${DOCKER_IP}
;;
container_ip)
echo "$(docker inspect -f '{{.NetworkSettings.IPAddress}}' ${1})"
;;
esac
}
function remove_containers {
docker rm -fv func-postgres-test 2>/dev/null || true
docker rm -fv func-mysql-test 2>/dev/null || true
docker rm -fv func-minio-test 2>/dev/null || true
}