Skip to content

Commit

Permalink
fix some issues found by codacy
Browse files Browse the repository at this point in the history
  • Loading branch information
cmeissner committed Oct 20, 2023
1 parent b957cbd commit dd9b5d5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions tests/docker/setup_database.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@ function info() {
echo "${@}" >&10
}

MYSQL_PING='mysqladmin ping -h ${DB_HOST:-127.0.0.1} -P ${DB_PORT:-3306} -u ${MYSQL_ROOT_USER:-root} -p${MYSQL_ROOT_PASSWORD:-rootpw}'
MYSQL_PING="mysqladmin ping -h ${DB_HOST:-127.0.0.1} -P ${DB_PORT:-3306} -u ${MYSQL_ROOT_USER:-root} -p${MYSQL_ROOT_PASSWORD:-rootpw}"

if grep -q podman <<< $(docker --version 2> /dev/null) ; then
info "Podman is installed"
DOCKER_CMD=$(which podman)
fi

if ${DOCKER_CMD} ps | grep -q docker_phpipam_1 && ! eval ${MYSQL_PING} ; then
if "${DOCKER_CMD}" ps | grep -q docker_phpipam_1 && ! eval "${MYSQL_PING}" ; then

info -n "Waiting for database connection "
while ! eval ${MYSQL_PING} ; do
while ! eval "${MYSQL_PING}" ; do
info -n "."
sleep 1
done
Expand Down

0 comments on commit dd9b5d5

Please sign in to comment.