From ce3a26d6653ed9fd89ed829af2bb82922c8363c3 Mon Sep 17 00:00:00 2001 From: Willy Kloucek Date: Mon, 12 Dec 2022 09:50:51 +0100 Subject: [PATCH] fail early if /app/open fails in CI --- .drone.star | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.drone.star b/.drone.star index 64f7da67ef..9b1deba8c3 100644 --- a/.drone.star +++ b/.drone.star @@ -834,11 +834,13 @@ def wopiValidatorTests(ctx, storage, accounts_hash_difficulty = 4): "image": OC_CI_ALPINE, "environment": {}, "commands": [ - "curl -k 'https://ocis-server:9200/remote.php/webdav/test.wopitest' --fail --retry-connrefused --retry 7 --retry-all-errors -X PUT -u admin:admin -D headers.txt", + "curl -v -X PUT 'https://ocis-server:9200/remote.php/webdav/test.wopitest' -k --fail --retry-connrefused --retry 7 --retry-all-errors -u admin:admin -D headers.txt", + "cat headers.txt", "export FILE_ID=$(cat headers.txt | sed -n -e 's/^.*Oc-Fileid: //p')", "export URL=\"https://ocis-server:9200/app/open?app_name=FakeOffice&file_id=$FILE_ID\"", "export URL=$(echo $URL | tr -d '[:cntrl:]')", - "curl -k -X POST \"$URL\" -u admin:admin -v > open.json", + "curl -v -X POST \"$URL\" -k --fail --retry-connrefused --retry 7 --retry-all-errors -u admin:admin > open.json", + "cat open.json", "cat open.json | jq .form_parameters.access_token | tr -d '\"' > accesstoken", "cat open.json | jq .form_parameters.access_token_ttl | tr -d '\"' > accesstokenttl", "echo -n 'http://wopiserver:8880/wopi/files/' > wopisrc",