diff options
author | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-19 20:10:23 +0100 |
---|---|---|
committer | Roeland Jago Douma <roeland@famdouma.nl> | 2018-02-19 21:49:38 +0100 |
commit | 1541af432e2bb2920bea8d3a2149cdd13db072d7 (patch) | |
tree | 91b906ea5e77c3225ddf7666e933b49442919988 | |
parent | 2a9b3b31aa122608972b01d8a2f0c43c3491ce0a (diff) | |
download | nextcloud-server-1541af432e2bb2920bea8d3a2149cdd13db072d7.tar.gz nextcloud-server-1541af432e2bb2920bea8d3a2149cdd13db072d7.zip |
Use a proper wait for create of the container
* Also create a test file so we know for sure it all works
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
-rw-r--r-- | .drone.yml | 3 | ||||
-rwxr-xr-x | tests/drone-wait-objectstore.sh | 29 |
2 files changed, 28 insertions, 4 deletions
diff --git a/.drone.yml b/.drone.yml index 1c7eba5f0f2..9a0e7b25484 100644 --- a/.drone.yml +++ b/.drone.yml @@ -851,9 +851,8 @@ services: matrix: OBJECT_STORE: s3 dockswift: - image: icewind1991/dockswift + image: icewind1991/dockswift:nextcloud-ci environment: - - INITIALIZE=yes - IPADDRESS=dockswift when: matrix: 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 |