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>
This commit is contained in:
Roeland Jago Douma 2018-02-19 20:10:23 +01:00
parent 2a9b3b31aa
commit 1541af432e
No known key found for this signature in database
GPG Key ID: F941078878347C0C
2 changed files with 28 additions and 4 deletions

View File

@ -851,9 +851,8 @@ services:
matrix: matrix:
OBJECT_STORE: s3 OBJECT_STORE: s3
dockswift: dockswift:
image: icewind1991/dockswift image: icewind1991/dockswift:nextcloud-ci
environment: environment:
- INITIALIZE=yes
- IPADDRESS=dockswift - IPADDRESS=dockswift
when: when:
matrix: matrix:

View File

@ -30,7 +30,32 @@ if [ "$OBJECT_STORE" == "swift" ]; then
sleep 2 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 fi