tests: allow container-name to be passed to cleanup_running_containers

This commit is contained in:
Sameer Naik
2015-09-09 19:41:02 +05:30
parent e480aba5c4
commit 4b840602a0

View File

@@ -9,8 +9,8 @@ VOL_PREFIX=/bitnami/mariadb
HOST_VOL_PREFIX=${HOST_VOL_PREFIX:-/tmp/bitnami/$CONTAINER_NAME}
cleanup_running_containers() {
if [ "$(docker ps -a | grep $CONTAINER_NAME)" ]; then
docker rm -fv $CONTAINER_NAME
if [ "$(docker ps -a | grep ${1:-$CONTAINER_NAME})" ]; then
docker rm -fv ${1:-$CONTAINER_NAME}
fi
}