diff options
author | Thomas Müller <DeepDiver1975@users.noreply.github.com> | 2016-07-13 20:23:00 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-07-13 20:23:00 +0200 |
commit | b569d0c2502f8806c76e1faebe26818daf9b213b (patch) | |
tree | 50875c6978d0564c9516709aa2366b6f716c0633 | |
parent | 0c2bba5b17f8b4cb7fbe9f318a46a6f1a109a89d (diff) | |
download | nextcloud-server-b569d0c2502f8806c76e1faebe26818daf9b213b.tar.gz nextcloud-server-b569d0c2502f8806c76e1faebe26818daf9b213b.zip |
Fix oracle unit test on 8.1 (#25471)
-rwxr-xr-x | autotest.sh | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/autotest.sh b/autotest.sh index 46c55edef19..fd4c0c031e2 100755 --- a/autotest.sh +++ b/autotest.sh @@ -150,10 +150,17 @@ function execute_tests { if [ "$1" == "oci" ] ; then echo "Fire up the oracle docker" DOCKER_CONTAINER_ID=$(docker run -d deepdiver/docker-oracle-xe-11g) - DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4) - - echo "Waiting 120 seconds for Oracle initialization ... " - sleep 120 + DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID") + + echo "Waiting for Oracle initialization ... " + # Try to connect to the OCI host via sqlplus to ensure that the connection is already running + for i in {1..48} + do + if sqlplus "autotest/owncloud@(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(Host=$DATABASEHOST)(Port=1521))(CONNECT_DATA=(SID=XE)))" < /dev/null | grep 'Connected to'; then + break; + fi + sleep 5 + done DATABASEUSER=autotest DATABASENAME='XE' @@ -161,7 +168,9 @@ function execute_tests { # trigger installation echo "Installing ...." + echo ./occ maintenance:install --database="$1" --database-name="$DATABASENAME" --database-host="$DATABASEHOST" --database-user="$DATABASEUSER" --database-pass=owncloud --database-table-prefix=oc_ --admin-user="$ADMINLOGIN" --admin-pass=admin --data-dir="$DATADIR" "$PHP" ./occ maintenance:install --database="$1" --database-name="$DATABASENAME" --database-host="$DATABASEHOST" --database-user="$DATABASEUSER" --database-pass=owncloud --database-table-prefix=oc_ --admin-user="$ADMINLOGIN" --admin-pass=admin --data-dir="$DATADIR" + more config/config.php #test execution echo "Testing with $1 ..." |