Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'tests/drone-wait-objectstore.sh')
-rwxr-xr-xtests/drone-wait-objectstore.sh29
1 files changed, 27 insertions, 2 deletions
diff --git a/tests/drone-wait-objectstore.sh b/tests/drone-wait-objectstore.sh
index f1d9faad7ab..228accc3da9 100755
--- a/tests/drone-wait-objectstore.sh
+++ b/tests/drone-wait-objectstore.sh
@@ -30,7 +30,32 @@ if [ "$OBJECT_STORE" == "swift" ]; then
sleep 2
- curl curl -s -X PUT -H "X-Auth-Token: $SWIFT_TOKEN" "$SWIFT_ENDPOINT/nextcloud"
+ while [ 1 ]
+ do
+ sleep 2
- sleep 2
+ respCode=$(curl -s -o /dev/null -w "%{http_code}" -X PUT -H "X-Auth-Token: $SWIFT_TOKEN" "$SWIFT_ENDPOINT/nextcloud")
+
+ if [ "$respCode" == "201" ]
+ then
+ break
+ fi
+ done
+
+ echo "creating test file"
+
+ while [ 1 ]
+ do
+ sleep 2
+
+ respCode=$(curl -s -o /dev/null -w "%{http_code}" -X PUT -H "X-Auth-Token: $SWIFT_TOKEN" -H "Content-Type: text/html; charset=UTF-8" -d "Hello world" "$SWIFT_ENDPOINT/nextcloud/helloworld.txt")
+
+ if [ "$respCode" == "201" ]
+ then
+ break
+ fi
+ done
+
+ echo "deleting test file"
+ curl -s -o /dev/null -w "%{http_code}\n" -X DELETE -H "X-Auth-Token: $SWIFT_TOKEN" "$SWIFT_ENDPOINT/nextcloud/helloworld.txt"
fi