Skip to content

Commit

Permalink
fail early if /app/open fails in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
wkloucek committed Dec 12, 2022
1 parent 58255d4 commit 5e0623f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -834,11 +834,12 @@ 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",
"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",
Expand Down

0 comments on commit 5e0623f

Please sign in to comment.