diff --git a/test/prepare_mysql.sh b/test/prepare_mysql.sh index f41f647..8ae50ba 100755 --- a/test/prepare_mysql.sh +++ b/test/prepare_mysql.sh @@ -1,6 +1,6 @@ #!/bin/bash -x -mysql_host=$(env | grep PORT_3306_TCP_ADDR | cut -d "=" -f 2) +mysql_host=$(env | grep "WP_SVC_.*DATABASE_MYSQL_SERVICE_HOST" | cut -d "=" -f 2) echo "Waiting for mysql to launch on ${mysql_host}:3306..." timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' "${mysql_host}" 3306 diff --git a/test/test_mysql_pw.sh b/test/test_mysql_pw.sh index 50ffd24..ade557d 100755 --- a/test/test_mysql_pw.sh +++ b/test/test_mysql_pw.sh @@ -1,6 +1,6 @@ #!/bin/bash -mysql_host=$(env | grep PORT_3306_TCP_ADDR | cut -d "=" -f 2) +mysql_host=$(env | grep "WP_SVC_.*DATABASE_MYSQL_SERVICE_HOST" | cut -d "=" -f 2) echo "Waiting for mysql to launch on ${mysql_host}:3306..." timeout 22 bash -c 'until printf "" 2>>/dev/null >>/dev/tcp/$0/$1; do sleep 1; done' "${mysql_host}" 3306