Skip to content

Commit 4908216

Browse files
committed
test(coreApiWebdavUploadTUS): assert etag and permissions on the finalizing TUS chunk
The chunked TUS finalize returns OC-ETag, ETag and OC-Perm since opencloud-eu/reva#718, so a client no longer needs a follow-up PROPFIND for the new etag and permissions. Add a scenario asserting these headers on the finalizing chunk, reusing existing step definitions (the etag is a dynamic quoted hash, hence the header-regex assertion). Verified locally red->green: red on stock (headers absent), green on an opencloud built on reva-with-opencloud-eu#718, on posix and decomposed. opencloud-eu#2409
1 parent ab7cf46 commit 4908216

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

tests/acceptance/features/coreApiWebdavUploadTUS/lowLevelUpload.feature

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,3 +90,23 @@ Feature: low level tests for upload of chunks
9090
| old |
9191
| new |
9292
| spaces |
93+
94+
@issue-2409
95+
Scenario Outline: finalize a chunked upload and get the etag and permissions
96+
Given using <dav-path-version> DAV path
97+
And user "Alice" has created a new TUS resource on the WebDAV API with these headers:
98+
| Upload-Length | 10 |
99+
# ZmlsZS50eHQ= is the base64 encode of file.txt
100+
| Upload-Metadata | filename ZmlsZS50eHQ= |
101+
When user "Alice" sends a chunk to the last created TUS Location with offset "0" and data "123" using the WebDAV API
102+
And user "Alice" sends a chunk to the last created TUS Location with offset "3" and data "4567890" using the WebDAV API
103+
Then the HTTP status code should be "204"
104+
And the following headers should match these regular expressions
105+
| OC-ETag | /^"[^"]*"$/ |
106+
| ETag | /^"[^"]*"$/ |
107+
| OC-Perm | /^[A-Za-z]+$/ |
108+
Examples:
109+
| dav-path-version |
110+
| old |
111+
| new |
112+
| spaces |

0 commit comments

Comments
 (0)