mirror of
https://github.com/fnproject/fn.git
synced 2022-10-28 21:29:17 +03:00
* 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.
28 lines
657 B
Bash
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
|
|
}
|