aboutsummaryrefslogtreecommitdiffstats
path: root/tests/objectstore/start-swift-ceph.sh
diff options
context:
space:
mode:
authorThomas Müller <DeepDiver1975@users.noreply.github.com>2016-07-05 08:54:51 +0200
committerGitHub <noreply@github.com>2016-07-05 08:54:51 +0200
commitd2d99a91a0bb47ab4f2116692f363b90a736711b (patch)
treea68250d1e2a7b2f25d2062504a741b8dbf0b1540 /tests/objectstore/start-swift-ceph.sh
parent34eec5726297d1720f5390a567609b07e2cbdd9f (diff)
downloadnextcloud-server-d2d99a91a0bb47ab4f2116692f363b90a736711b.tar.gz
nextcloud-server-d2d99a91a0bb47ab4f2116692f363b90a736711b.zip
fix swift primary object store test (#25281)
* Wait for socket to be open * Fix call on null * Allow DB access for MountProviderTest Makes unit tests pass when using object store, since their FS access is actually oc_filecache DB access. It is currently not possible to mock or bypass the logic from "SharedMount::verifyMountPoint()" triggered by this test.
Diffstat (limited to 'tests/objectstore/start-swift-ceph.sh')
-rwxr-xr-xtests/objectstore/start-swift-ceph.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/tests/objectstore/start-swift-ceph.sh b/tests/objectstore/start-swift-ceph.sh
index 089aab6a648..bbf483c2897 100755
--- a/tests/objectstore/start-swift-ceph.sh
+++ b/tests/objectstore/start-swift-ceph.sh
@@ -30,6 +30,7 @@ thisFolder="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# create readiness notification socket
notify_sock=$(readlink -f "$thisFolder"/dockerContainerCeph.$EXECUTOR_NUMBER.swift.sock)
+rm -f "$notify_sock" # in case an unfinished test left one behind
mkfifo "$notify_sock"
port=5034
@@ -67,7 +68,13 @@ if [[ $ready != 'READY=1' ]]; then
docker logs $container
exit 1
fi
-sleep 1
+if ! "$thisFolder"/wait-for-connection ${host} 80 600; then
+ echo "[ERROR] Waited 600 seconds, no response" >&2
+ docker logs $container
+ exit 1
+fi
+echo "Waiting another 15 seconds"
+sleep 15
cat > $thisFolder/swift.config.php <<DELIM
<?php
@@ -101,5 +108,7 @@ if [ -n "$DEBUG" ]; then
cat $thisFolder/swift.config.php
echo "### contents of $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift"
cat $thisFolder/dockerContainerCeph.$EXECUTOR_NUMBER.swift
+ echo "### docker logs"
+ docker logs $container
echo "############## DEBUG info end ###########"
fi