summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-10-30 09:28:33 +0100
committerMorris Jobke <hey@morrisjobke.de>2015-10-30 09:28:33 +0100
commita91572b7f39038d960fc567859f2b2c7442ca5a7 (patch)
treec1cb61876f264d9f373ea7716fc0a81757b214d8
parent0c1a8c953aba8968301f0871a607d5abcf7b3003 (diff)
downloadnextcloud-server-a91572b7f39038d960fc567859f2b2c7442ca5a7.tar.gz
nextcloud-server-a91572b7f39038d960fc567859f2b2c7442ca5a7.zip
Use proper statement to retrieve the IP of an docker instance
-rwxr-xr-xapps/files_external/tests/env/start-amazons3-ceph.sh2
-rwxr-xr-xapps/files_external/tests/env/start-ftp-morrisjobke.sh2
-rwxr-xr-xapps/files_external/tests/env/start-sftp-atmoz.sh2
-rwxr-xr-xapps/files_external/tests/env/start-smb-silvershell.sh2
-rwxr-xr-xautotest.sh6
-rwxr-xr-xtests/objectstore/start-swift-ceph.sh2
6 files changed, 8 insertions, 8 deletions
diff --git a/apps/files_external/tests/env/start-amazons3-ceph.sh b/apps/files_external/tests/env/start-amazons3-ceph.sh
index ad0fedba989..3b4a15da92a 100755
--- a/apps/files_external/tests/env/start-amazons3-ceph.sh
+++ b/apps/files_external/tests/env/start-amazons3-ceph.sh
@@ -41,7 +41,7 @@ container=`docker run -d \
-e RGW_CIVETWEB_PORT=$port \
${docker_image}`
-host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
+host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
echo "${docker_image} container: $container"
diff --git a/apps/files_external/tests/env/start-ftp-morrisjobke.sh b/apps/files_external/tests/env/start-ftp-morrisjobke.sh
index 14112d7f803..f1ab7f69952 100755
--- a/apps/files_external/tests/env/start-ftp-morrisjobke.sh
+++ b/apps/files_external/tests/env/start-ftp-morrisjobke.sh
@@ -34,7 +34,7 @@ password=12345
container=`docker run -d -e USERNAME=$user -e PASSWORD=$password morrisjobke/docker-proftpd`
-host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
+host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
cat > $thisFolder/config.ftp.php <<DELIM
<?php
diff --git a/apps/files_external/tests/env/start-sftp-atmoz.sh b/apps/files_external/tests/env/start-sftp-atmoz.sh
index 91eb5747c54..bebc7289250 100755
--- a/apps/files_external/tests/env/start-sftp-atmoz.sh
+++ b/apps/files_external/tests/env/start-sftp-atmoz.sh
@@ -34,7 +34,7 @@ password=12345
container=`docker run -d atmoz/sftp $user:$password:1001`
-host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
+host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
cat > $thisFolder/config.sftp.php <<DELIM
<?php
diff --git a/apps/files_external/tests/env/start-smb-silvershell.sh b/apps/files_external/tests/env/start-smb-silvershell.sh
index c45807cc4c8..41ba3b11a70 100755
--- a/apps/files_external/tests/env/start-smb-silvershell.sh
+++ b/apps/files_external/tests/env/start-smb-silvershell.sh
@@ -31,7 +31,7 @@ fi;
container=`docker run -d -e SMB_USER=test -e SMB_PWD=test silvershell/samba`
-host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
+host=`docker inspect --format="{{.NetworkSettings.IPAddress}}" $container`
cat > $thisFolder/config.smb.php <<DELIM
<?php
diff --git a/autotest.sh b/autotest.sh
index 460fa9e38b1..f0efc45ccca 100755
--- a/autotest.sh
+++ b/autotest.sh
@@ -190,7 +190,7 @@ function execute_tests {
-e MYSQL_PASSWORD=owncloud \
-e MYSQL_DATABASE="$DATABASENAME" \
-d rullzer/mariadb-owncloud)
- DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4)
+ DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
echo "Waiting for MariaDB initialisation ..."
@@ -215,7 +215,7 @@ function execute_tests {
if [ ! -z "$USEDOCKER" ] ; then
echo "Fire up the postgres docker"
DOCKER_CONTAINER_ID=$(docker run -e POSTGRES_USER="$DATABASEUSER" -e POSTGRES_PASSWORD=owncloud -d postgres)
- DATABASEHOST=$(docker inspect "$DOCKER_CONTAINER_ID" | grep IPAddress | cut -d '"' -f 4)
+ DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
echo "Waiting for Postgres initialisation ..."
@@ -230,7 +230,7 @@ function execute_tests {
if [ "$DB" == "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)
+ DATABASEHOST=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$DOCKER_CONTAINER_ID")
echo "Waiting for Oracle initialization ... "
diff --git a/tests/objectstore/start-swift-ceph.sh b/tests/objectstore/start-swift-ceph.sh
index 91a813f8bb3..8863a1f9f16 100755
--- a/tests/objectstore/start-swift-ceph.sh
+++ b/tests/objectstore/start-swift-ceph.sh
@@ -48,7 +48,7 @@ container=`docker run -d \
--privileged \
--entrypoint /entrypoint.sh ${docker_image}`
-host=`docker inspect $container | grep IPAddress | cut -d '"' -f 4`
+host=$(docker inspect --format="{{.NetworkSettings.IPAddress}}" "$container")
echo "${docker_image} container: $container"